-
Notifications
You must be signed in to change notification settings - Fork 662
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
Upload multiple files in one request #671
Comments
multi fileupload by using flowJs multiple request fine depends on fileFize. can any one ng2-file-upload problem on multiplefile. |
I noticed this too, the @Salma7amed Did have any sucess on uploading all files in a single request? |
@rbasniak not using this library. |
@Salma7amed What library are you using now? |
@rbasniak I used FormData to perform a post request with the files. |
The file that uploads the attached files in
Just like @Salma7amed said above. |
Finally, I was inspired thanks to @ClaytonBrawley and can solve this issue extending FileUploader class:
Then, in the component can be use like this:
Notice that all files are appending to sendable with the name "files", so it could be refactored better. |
@josecarlosaparicio : |
@josecarlosaparicio : |
Is this 1 file per request the expected behaviour from the beginning, or would a PR be accepted if it were to fix this behaviour (maybe with an optional setter)? |
1 file per request is working as expected. I think with an option setter for upload all rather than per file would be good. What I have as a workaround is all on the server end by submitting the total queue count and along with the files and handling it with the 1 file per upload scenario. If the entire batch of files can be submitted at one, this could be avoided. |
Big TIME +1 I am not a big fan of extending(hacking) other people's work, "Patience is a Virtue" :) |
@judsonmusic I'm currently working on this feature, I will open up a PR as soon as it's finished :) |
We're trying to get this into a better shape so if you still have that PR it would be awesome 😉 |
If no one gets to this I can try and throw something together if more details are provided. |
@ClaytonBrawley you can assign this to yourself and see what you can done. Once you have something create a PR and we can all have a look. |
@dannyhchan See below for a workaround on firing the onCompleteItem callback.
|
Ran into the same Issue. Ended up rewriting my process function on the server to handle one item per call and not all at once. Annoying because i can't bulk further requests. |
@adrianfaciu Is anyone working on this? I could do a PR otherwise |
As far as I know, no, there is no open PR for this. |
@adrianfaciu @a-morn I create a PR #993 for a multiupload in one reqeust. It probably needs some refactoring. Let me know what you think of it. |
I was just looking for a way to upload all files individually and I got to this threat finding out that it is the default behaviour, which is what I needed @koenvanderlinden does you PR #993 consider allowing the use of both approaches? both use cases are valid and it should count for them. |
@eikishi01 you could use both. The way how multiple upload is done is based on configuration of the upload component. |
@andrew-starosciak |
this.uploader.clearQueue(); onsucess file not removed get error
|
i think this works for multiple files :
|
Hi everyone,
Hope it can be useful. |
@josecarlosaparicio your solution works like a charm but the progress bar is set to 0 and it is never updated! Therefore the progress bar does not work. Any solution about this problem you may think of? |
What I noticed is that if I upload multiple files at once. The uploader performs multiple requests to the url for each single file. So is it possible to receive all the files in one request ?
The text was updated successfully, but these errors were encountered: