1
0
Fork 0
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:
Eggbertx 2024-05-17 10:57:23 -07:00
parent caea5ee77e
commit 3547b3117e
8 changed files with 26 additions and 23 deletions

View file

@ -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)