Closed xiongzhend closed 3 years ago
options.allowEmptyFiles false
@GrosSacASac
if set options.allowEmptyFiles
to false, will get exception:
options.allowEmptyFiles is false, file size should be greather than 0
file uploading will fail
if set options.allowEmptyFiles
to true, file uploading success
but got the blank files
with once submit POST file but will get two upload request
Example app listening at http://localhost:8080
parsing
files: application/octet-stream
parsing
files: image/jpeg
PR welcome
After some Trial and error, I find out my frontend code has bug It will accidentally send two request with once submit POST in certain condition
After fixing bug, the exception and blank files are gone with options.allowEmptyFiles = false
Sorry for bothering!
I am having the same problem, but I'm certain the POST request happens only once. When no files are uploaded I get the exception:
options.allowEmptyFiles is false, file size should be greather than 0
it also looks like formidable sees it as application/octet-stream
so some data is actually being sent by my browser?
For example, I have 3 file choose , and only pick the 1st file, and submit, then I got one real image uploaded and 2 blank files on the server, how to avoid that? Thanks.