fix(nodejs): correct formidable 4 filepath in forcesave

This commit is contained in:
sshakndr
2025-09-18 16:08:36 +07:00
committed by Sergey Linnik
parent bcd2693a7f
commit cfb6dc9b41

View File

@ -721,7 +721,7 @@ app.post('/forcesave', async (req, res) => {
res.end();
return;
}
const filePath = files.file.path;
const filePath = files.file.filepath || files.file[0].filepath;
const data = fileSystem.readFileSync(filePath);
await req.DocManager.forcesaveFile(data, fName, fileUtility.getFileExtension(fName), uAddress);
fileSystem.unlinkSync(filePath);