Fixed file size limit of 2^31-2.
All checks were successful
/ Build the server (push) Successful in 7m8s
All checks were successful
/ Build the server (push) Successful in 7m8s
This commit is contained in:
parent
b75c672c0f
commit
2a1c3a9f72
@ -93,7 +93,7 @@ void Server::upload(const std::shared_ptr<restbed::Session> &s) {
|
|||||||
auto node = get_node(user, node_id);
|
auto node = get_node(user, node_id);
|
||||||
if (!node) return s->close(400, "Invalid node");
|
if (!node) return s->close(400, "Invalid node");
|
||||||
if (!node->file) return s->close(400, "Can't upload to a directory");
|
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<std::size_t>("Content-Length", 0);
|
||||||
auto path = user->user_dir / std::to_string(node->id);
|
auto path = user->user_dir / std::to_string(node->id);
|
||||||
if (node->preview) {
|
if (node->preview) {
|
||||||
node->preview = false;
|
node->preview = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user