From 2a1c3a9f721f8b789b8709b748edc7a24c188afa Mon Sep 17 00:00:00 2001 From: Mutzi Date: Sat, 13 Apr 2024 12:26:01 +0200 Subject: [PATCH] Fixed file size limit of 2^31-2. --- src/server/upload.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/upload.cxx b/src/server/upload.cxx index 8eaa68d..57c6918 100644 --- a/src/server/upload.cxx +++ b/src/server/upload.cxx @@ -93,7 +93,7 @@ void Server::upload(const std::shared_ptr &s) { auto node = get_node(user, node_id); if (!node) return s->close(400, "Invalid node"); if (!node->file) return s->close(400, "Can't upload to a directory"); - std::size_t to_read = req->get_header("Content-Length", 0); + auto to_read = req->get_header("Content-Length", 0); auto path = user->user_dir / std::to_string(node->id); if (node->preview) { node->preview = false;