better api
This commit is contained in:
@@ -5,8 +5,9 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"fitra-backend/utils"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func HandleFileDownload(c *gin.Context) {
|
||||
@@ -25,7 +26,7 @@ func HandleFileDownload(c *gin.Context) {
|
||||
}
|
||||
|
||||
// Send analytics event
|
||||
utils.SendAnalyticsEvent("file_download", "/api/download/"+fileID+"/"+filename, "File Download", c.GetHeader("User-Agent"), c.ClientIP())
|
||||
utils.SendAnalyticsEvent("pageview", "/api/download/"+fileID+"/"+filename)
|
||||
|
||||
c.Header("Content-Description", "File Transfer")
|
||||
c.Header("Content-Transfer-Encoding", "binary")
|
||||
|
||||
Reference in New Issue
Block a user