mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
node: upload request without file
This commit is contained in:
@ -135,6 +135,13 @@ app.post("/upload", function (req, res) {
|
||||
|
||||
const file = files.uploadedFile;
|
||||
|
||||
if (file == undefined) {
|
||||
res.writeHead(200, { "Content-Type": "text/plain" });
|
||||
res.write("{ \"error\": \"Uploaded file not found\"}");
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
|
||||
file.name = docManager.getCorrectName(file.name);
|
||||
|
||||
if (configServer.get('maxFileSize') < file.size || file.size <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user