diff --git a/cmd/backend/images.go b/cmd/backend/images.go index 367ed3a..f66c74a 100644 --- a/cmd/backend/images.go +++ b/cmd/backend/images.go @@ -23,8 +23,8 @@ func SaveImage(c *Config, src io.Reader) (string, error) { img = imaging.Resize(img, c.MaxImgWidth, 0, imaging.Lanczos) } - filename := fmt.Sprint(c.PicsDir, "/", uuid.New(), ".webp") - file, err := os.Create(filename) + filename := fmt.Sprint(uuid.New(), ".webp") + file, err := os.Create(c.PicsDir + "/" + filename) if err != nil { return "", fmt.Errorf("error creating new image file: %v", err) }