-
-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
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
Can't upload empty file when using asyncReadFileFn hook [v3 regression] #375
Comments
Maybe you could create a failing test to demonstrate this? |
From a quick look, the problem is that we must determinate between an empty regular file and a stream which finished reading (thus returning 0) Why are you using the |
@AidasK @drzraf I'm currently playing on a fork > v3...bertrandg:flow.js:v3 It doesn't work at all, uploads never starts and no error displayed.. @drzraf Here is my usecase, I want a hash from each chunk:
|
Quoting from #353 (comment)
So the code was put in a instable stable at that commit. This was a huge commit, it changed the semantics, the regression wasn't spotted soon enough but, more importantly, fixing it implies deeply architectural changes. (The problem was that going full-async would break the behavior inside xhr.request listeners and the recursion mechanism) I'm sorry I didn't have the time to dig into this again more than when I stopped at #368 (when I understood that relying upon XHR recursive handlers was inherently incompatible with the async changes already merged in #363) |
Hello @drzraf, Yes I know huge v3 refacto change/break many things but that's not directly related to my issue there because I compare to a working (at least for my usecases) version using latest V3 branch commit : So my current issue is more related to the build process, how did you build the lib ( |
You're right. dist/* were not regenerated (and committed) lately. Will consider that if we ever fix #368 |
Hi,
I'm using V3 branch since multiple months and it works well but i've discoved this small regression.
I'm unable to send empty files when using
asyncReadFileFn
hook.Investigating, it seems to come from there:
flow.js/src/FlowChunk.js
Line 341 in 5591263
From what i've seen convert to this fix it:
if (data && (data.size > 0 || this.fileObj.size === 0)) {
But i would like to have a feedback from you @drzraf before making an MR.
The text was updated successfully, but these errors were encountered: