richardgirges / express-fileupload

Simple express file upload middleware that wraps around busboy
MIT License
1.52k stars 261 forks source link

Page reloading after uploading same file #268

Closed Sofronijev closed 3 years ago

Sofronijev commented 3 years ago

Hi,

After a few days of bug searching, I found out that newer versions of react-scripts are making page reload when I upload the same file. I tested this with version 3.0.1, 3.4.3, 4.0.3, it only works on 3.0.1 and lower.

You can use this example to recreate the bug https://github.com/bradtraversy/react_file_uploader Just update react-scripts to the latest version and it will start reloading the page after upload, but only when the file is already uploaded. I used debug: true but it's not showing anything strange.

On the project that I'm working on, I get this error a lot Express-file-upload: Request is not eligible for file upload!, I thought it would disappear after I downgrade react-scripts but it's still here and It also happens when I just reload the page or go to any other page in the app.

cristiancosano commented 3 years ago

Check if your form has encType="multipart/form-data" attribute and post method (get and head not are eligibles.

Sofronijev commented 3 years ago

Looks like the issue resolved itself, I didn't change anything.