We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I find a bug.
A small file which maybe 9k can not be pushed into 'files'.I debug it and perhaps it returned before the stream was pushed into the files.
I get what's wrong.
the busboy closed before the writeStream open.
so if i code like this
function onFile(files, fieldname, file, filename, encoding, mimetype) { const tmpName = file.tmpName = new Date().getTime() + fieldname + filename; const saveTo = path.join(os.tmpDir(), path.basename(tmpName)); const writeStream = file.pipe(fs.createWriteStream(saveTo)); const readStream = fs.createReadStream(saveTo); readStream.fieldname = fieldname readStream.filename = filename readStream.transferEncoding = readStream.encoding = encoding readStream.mimeType = readStream.mime = mimetype; files.push(readStream); }
then it work.
is it a bug or there is anyother reason why you code such as?
The text was updated successfully, but these errors were encountered:
Hi, I apologise for the late reply and thank you for reporting!
There is a reason why wait for open event. See #1
open
I will make some testing the next few days. Otherwise you are welcome to submit a PR.
Sorry, something went wrong.
Fixes m4nuC#3 : Register event before reading uploaded file
637e6a1
Fixed with #4
Merge pull request #4 from abalhier/fix_issue_3_small_file_upload
799d0fc
Fixes #3 : Register event before reading uploaded file
No branches or pull requests
I find a bug.
A small file which maybe 9k can not be pushed into 'files'.I debug it and perhaps it returned before the stream was pushed into the files.
I get what's wrong.
the busboy closed before the writeStream open.
so if i code like this
then it work.
is it a bug or there is anyother reason why you code such as?
The text was updated successfully, but these errors were encountered: