diff --git a/server/impl/upload.go b/server/impl/upload.go index 451d002..b44fd72 100644 --- a/server/impl/upload.go +++ b/server/impl/upload.go @@ -84,16 +84,12 @@ func UploadHandler(w http.ResponseWriter, r *http.Request) { return } - deviceId, err := filenamify.Filenamify(params["name"], filenamify.Options{ - Replacement: "0", - }) + deviceId, err := filenamify.Filenamify(params["name"], filenamify.Options{}) if err != nil { utils.RenderError(w, WrongDateClassifier, http.StatusBadRequest) return } - filename, err := filenamify.Filenamify(params["filename"], filenamify.Options{ - Replacement: "0", - }) + filename, err := filenamify.Filenamify(params["filename"], filenamify.Options{}) if err != nil { utils.RenderError(w, WrongDateClassifier, http.StatusBadRequest) return diff --git a/server/utils/util.go b/server/utils/util.go index fb08392..e890b23 100644 --- a/server/utils/util.go +++ b/server/utils/util.go @@ -111,7 +111,7 @@ func GetImageFromFilePath(filePath string) (image.Image, error) { if err != nil { logger.Error(err) } - + defer reader.Close() reader.Seek(0, 0) m, _, err := image.Decode(reader)