Added DBName into CliArgs

This commit is contained in:
2024-03-29 09:16:41 +01:00
parent af036b4909
commit 9408ce99e3
3 changed files with 32 additions and 30 deletions

View File

@ -385,7 +385,7 @@ func UploadImage(c *control.CliArgs) http.HandlerFunc {
}
defer file.Close()
filename := fmt.Sprint("tmp/pics/", time.Now().Format("2006-01-02_15:04:05"), "-", header.Filename)
filename := fmt.Sprint(c.PicsDir, time.Now().Format("2006-01-02_15:04:05"), "-", header.Filename)
img, err := os.Create(filename)
if err != nil {
log.Println(err)