fix: clarify behavior for existing query parameters in downloadFile redirect

This commit is contained in:
2025-11-29 12:21:03 +08:00
parent 6040f88034
commit 1406f76fbb

View File

@@ -231,6 +231,7 @@ func downloadFile(c fiber.Ctx) error {
} }
q := uri.Query() q := uri.Query()
if len(q) != 0 { if len(q) != 0 {
// If there are already query parameters, assume the URL is signed
return c.Redirect().Status(fiber.StatusFound).To(uri.String()) return c.Redirect().Status(fiber.StatusFound).To(uri.String())
} }
token, err := utils.GenerateDownloadToken(s) token, err := utils.GenerateDownloadToken(s)