-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Collection Upload] Cannot upload multiple files in sync-mode #8
Comments
I'll check it quickly. I know everything was working... some times ago. Let me some time to check this out, |
@sescandell It behaves as if on "add file" the current "files selected for upload" list was cleared. |
Hi @loostro Could you please give me additional informations about your issue? I think I firstly missunderstood something and just forget something about the CollectionUpload behavior. If your point is "I'm not able to add multiple files from different directories in SYNC-mode" actually this is "not really a bug" but a limitation to HTML5 file input. My point is, I just run the project sescandell/CollectionUplaodSample and Sync mode is working (given the limitations of selecting files from the same directory).
Maybe this is not clear enough and should be clearly explained in another part of the documentation (like a new "chapter" "Known limitations"). If the issue you encountered is different, let me know :) |
Actually this is also precised in the |
@sescandell actually, my issue was selecting multiple files in the same directory, which I expected to work... but switching to async mode is actually quite easy and it fixes all problems :) |
Well... I "miss expressed myself". One "strange" behavior is the following:
Only the second file will be listed in the collection. This is because of the same limitation if the |
So.. it's not a bug.. but a limitation of HTML input, which does not occur in ASYNC mode, becouse we "add" the files into multiple inputs, right? |
Yes... a kind of... It doesn't appear in ASYNC mode because, on that specific case, I store files in JS memory and process them. We don't rely anymore on the file input API. Matter is HTML5 API is "read only" (for security reason, otherwise you would be able to add "any" file to uploads). We can't manipulate it to add files from JS. So in SYNC mode, when you click on the "browse" button and validate your choice, it simply clears the list and adds the selected files to the input (when you click on browse then cancel, it simply clear the list). Maybe we need to be clearer on that specific point :) My mistake, there was a long time I didn't work on that and totally forget all of this (but now I'm thinking about it, I remember how much time I waste trying to find something to make it working...) |
Well, if I remember correct, the first version of this widget relied on HTML inputs and it created 1 input per file. So when you clicked "select" the input with selected file was moved (to the selected files list) and under the "add" button, a new (empty) input was created/copied. But I'm not sure it worked 100%, I remember some issues with multiple file selecting. So.. for SYNC mode we could remove the individual "cancel" buttons (leave only "cancel all" button), but selecting multiple files in the same directory should be fixed. |
Agree with you
If you want to fix this behavior, you can't rely on "one input to handle all files" (the input file multiple="true" option). You need to make something based on, as you proposed, dynamically duplicating inputs. |
Since we're short on time and this can be fixed by switching to ASYNC mode, I'll leave it as low priority issue to be fixed later. |
Seems like something was broken, when we modified the code for async upload.
In synchronous mode, when you add more than 1 file, the file get replaced (instead of added).
This bug disappears when switching to async mode.
@sescandell Any ideas what might cause this? Maybe somewhere the file list is cleared? It shouldn't be for SYNC mode.
The text was updated successfully, but these errors were encountered: