mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-26 14:46:24 -07:00
Use proper "Go-like" names for file modes
Try to create log dir if it doesn't exist
This commit is contained in:
parent
caea5ee77e
commit
3547b3117e
8 changed files with 26 additions and 23 deletions
|
@ -156,7 +156,7 @@ func AttachUploadFromRequest(request *http.Request, writer http.ResponseWriter,
|
|||
}
|
||||
}
|
||||
|
||||
if err = os.WriteFile(filePath, data, config.GC_FILE_MODE); err != nil {
|
||||
if err = os.WriteFile(filePath, data, config.NormalFileMode); err != nil {
|
||||
errEv.Err(err).Caller().Send()
|
||||
writer.WriteHeader(http.StatusInternalServerError)
|
||||
return nil, fmt.Errorf("couldn't write file %q", upload.OriginalFilename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue