Skip to content
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

Multi-upload in a single request #993

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ Easy to use Angular2 directives for files upload ([demo](http://valor-software.g
5. `formatDataFunction` - Function to modify the request body. 'DisableMultipart' must be 'true' for this function to be called.
6. `formatDataFunctionIsAsync` - Informs if the function sent in 'formatDataFunction' is asynchronous. Defaults to false.
7. `parametersBeforeFiles` - States if additional parameters should be appended before or after the file. Defaults to false.

8. `uploadFilesInSingleRequest` - If 'true', all files in the queue will be uploaded using one multipart request. Defaults to false. Notice this cannot be combined with 'disableMultipart' is 'true'.

### Events

- `fileOver` - it fires during 'over' and 'out' events for Drop Area; returns `boolean`: `true` if file is over Drop Area, `false` in case of out.
Expand Down
5 changes: 3 additions & 2 deletions demo/src/app/components/file-upload/simple-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ export class SimpleDemoComponent {
constructor (){
this.uploader = new FileUploader({
url: URL,
disableMultipart: true, // 'DisableMultipart' must be 'true' for formatDataFunction to be called.
formatDataFunctionIsAsync: true,
disableMultipart: false, // 'DisableMultipart' must be 'true' for formatDataFunction to be called.
uploadFilesInSingleRequest: true,
formatDataFunctionIsAsync: false,
formatDataFunction: async (item) => {
return new Promise( (resolve, reject) => {
resolve({
Expand Down
Loading