set working dir for systemd service

This commit is contained in:
2025-04-11 23:42:18 +02:00
parent 2c4c21bd4d
commit 0b4439647a
2 changed files with 3 additions and 2 deletions

View File

@@ -90,10 +90,10 @@ func (rc *shopItemController) NewShopItemFromForm(ctx *gin.Context) (models.Shop
dstPdf := ""
pdf, err := ctx.FormFile("pdf")
fmt.Println(pdf)
if err == nil {
dstPdf = filepath.Join("static/uploads", pdf.Filename)
fmt.Println("Saving pdf at ", dstPdf)
if err := ctx.SaveUploadedFile(pdf, dstPdf); err != nil {
return models.ShopItem{}, fmt.Errorf("Could not save PDF")
}