👔 Remove single file 1MB limit in site

This commit is contained in:
2025-11-24 22:54:16 +08:00
parent c42befed6b
commit a92dc7e140

View File

@@ -63,12 +63,8 @@ public class SiteManagerController(
if (file == null || file.Length == 0)
return BadRequest("No file provided");
const long maxFileSize = 1048576; // 1MB
const long maxTotalSize = 26214400; // 25MB
if (file.Length > maxFileSize)
return BadRequest("File size exceeds 1MB limit");
var currentTotal = await fileManager.GetTotalSiteSize(siteId);
if (currentTotal + file.Length > maxTotalSize)
return BadRequest("Site total size would exceed 25MB limit");