Finished file name tracking
This commit is contained in:
@@ -3,6 +3,7 @@ package controllers
|
||||
import (
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -102,7 +103,8 @@ func HandleFileUpload(c *gin.Context) {
|
||||
}
|
||||
|
||||
// Send analytics event
|
||||
utils.SendAnalyticsEvent("pageview", "/api/upload")
|
||||
properties := fmt.Sprintf(`{"filename": "%s", "size": %d}`, header.Filename, header.Size)
|
||||
utils.SendCustomEvent("file_upload", "/api/upload", properties)
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "File uploaded successfully",
|
||||
|
||||
Reference in New Issue
Block a user