Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed incomplete file upload issue. Closes #167
Route now waits until all files have been written / closed until executing
- Loading branch information
Showing
1 changed file
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2701dfd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there are a couple issues here.
First, if this is not a file upload,
promise.emitSuccess()
is never executed resulting in request timeouts.Second, (and I might be way off here), on an upload, if the first
part
fires complete before the next part starts,emitSuccess
will fire too early.2701dfd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its a bit of a clusterfuck, lovely verbose async stuff. As for the non-file multi-part body
it should work fine (pretty sure) because of !--pendingFiles, however when no parts (including regular form fields)
are present it might not fire correctly, ill have to try that out.
I think you are right about that actually, I will see what I can do to work around that, might not be any
reasonable way to determine how many files are inbound