'Generic Commit'
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 1m20s
Build-Test-Publish / build (linux/arm64) (push) Successful in 2m1s
Build-Test-Publish / create-manifest (push) Successful in 14s

This commit is contained in:
Your Name
2025-06-15 16:37:57 +12:00
parent a4d9e3ebb5
commit bf9f714a3d
4 changed files with 47 additions and 14 deletions

View File

@@ -51,7 +51,7 @@ void PutHandler::handle_put_object(const drogon::HttpRequestPtr& req, std::funct
if (!contentLengthHeader.empty()) {
try {
size_t contentLength = std::stoull(contentLengthHeader);
const size_t MAX_UPLOAD_SIZE = 2ULL * 1024 * 1024 * 1024; // 2GB
const size_t MAX_UPLOAD_SIZE = 6ULL * 1024 * 1024 * 1024; // 6GB
if (contentLength > MAX_UPLOAD_SIZE) {
resp->setStatusCode(drogon::k413RequestEntityTooLarge);
nlohmann::json response = {{"result", "error"}, {"error", "File too large"}};