Allow normal user to upload.

This commit is contained in:
2025-07-10 15:10:56 +08:00
parent 747f76991d
commit dd5e5193da
14 changed files with 216 additions and 17 deletions

View File

@@ -128,6 +128,8 @@ func serveIndexHtml(c fiber.Ctx) error {
content = strings.ReplaceAll(content, "{{Url}}", url)
content = strings.ReplaceAll(content, "{{CFTurnstileSiteKey}}", cfTurnstileSiteKey)
content = strings.ReplaceAll(content, "{{SiteInfo}}", siteInfo)
content = strings.ReplaceAll(content, "{{UploadPrompt}}", config.UploadPrompt())
content = strings.ReplaceAll(content, "{{AllowNormalUserUpload}}", strconv.FormatBool(config.AllowNormalUserUpload()))
c.Set("Content-Type", "text/html; charset=utf-8")
return c.SendString(content)