mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
Add temporary token generation for secure file downloads
This commit is contained in:
@@ -403,6 +403,7 @@ func GetFile(fid string) (*model.FileView, error) {
|
||||
return file.ToView(), nil
|
||||
}
|
||||
|
||||
// DownloadFile handles the file download request. Return a presigned URL or a direct file path.
|
||||
func DownloadFile(ip, fid, cfToken string) (string, string, error) {
|
||||
passed, err := verifyCfToken(cfToken)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user