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;