API: Refactor response headers #822 #846

This commit is contained in:
Michael Mayer
2021-01-08 09:02:30 +01:00
parent 6b51ef659a
commit 92df3aa724
17 changed files with 120 additions and 80 deletions

View File

@@ -1,7 +1,6 @@
package api
import (
"fmt"
"net/http"
"github.com/photoprism/photoprism/internal/entity"
@@ -76,8 +75,6 @@ func GetDownload(router *gin.RouterGroup) {
downloadName = f.ShareBase()
}
c.Header("Content-Disposition", fmt.Sprintf("attachment; filename=%s", downloadName))
c.File(fileName)
c.FileAttachment(fileName, downloadName)
})
}