danialfarid / ng-file-upload

Lightweight Angular directive to upload files with optional FileAPI shim for cross browser support
MIT License
7.87k stars 1.59k forks source link

Upload multiple files without using multiple="true" #1896

Open bhaidar opened 7 years ago

bhaidar commented 7 years ago

Hello, I need to use this file upload in the single mode. Such that, I will have 3 instances of the file upload on the form, each will be used for a different file attachment type.

When the user submits the form, I need to send the 3 files to the server at once.

The point is not to use the multiple feature on the control.

I could use "FormData" to send all 3 files together. I need to grab the file attached to each control and then using FormData I can fill in the 3 files and use Upload.upload() to send all files together.

Is there a way to read the file attached in each directive manually?

Thanks

bhaidar commented 7 years ago

Any idea pls? Thanks