set working dir for systemd service
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user