Closed odnarb closed 4 years ago
Try uploading an .xlsx file with this config set.
Also, pretty sure "preserveExtensionLengh" is a typo. :)
https://github.com/richardgirges/express-fileupload/blob/c7a6b9c8ca6f88bc2cfe2ad2f0881f21f629c683/lib/utilities.js#L9
Maybe I haven't tried a bunch of different options, but I instantiate the file upload middleware with this:
app.use(fileUpload({ createParentPath: true, safeFileNames: true, preserveExtension: true, abortOnLimit: true, useTempFiles: true, tempFileDir: dir_uploads, //busboy options highWaterMark: 2 * 1024 * 1024, // Set 2MB buffer limits: { fileSize: 200 * 1024 * 1024 //set 200MB limit } }))
Hey,
I think if you use preserveExtension: 4 it should work :)
preserveExtension: 4
Cheers, Jonas
Thank you that worked. I was pretty tired that night, didn't see the parseInt() at ALL. hah!
Try uploading an .xlsx file with this config set.
Also, pretty sure "preserveExtensionLengh" is a typo. :)
https://github.com/richardgirges/express-fileupload/blob/c7a6b9c8ca6f88bc2cfe2ad2f0881f21f629c683/lib/utilities.js#L9
Maybe I haven't tried a bunch of different options, but I instantiate the file upload middleware with this: