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

igUpload unable to upload multiple files in same http request #1228

Closed
kdinev opened this issue Sep 27, 2017 · 1 comment
Closed

igUpload unable to upload multiple files in same http request #1228

kdinev opened this issue Sep 27, 2017 · 1 comment

Comments

@kdinev
Copy link
Member

kdinev commented Sep 27, 2017

Description

Describe the issue.

I want to upload multiple files within the same XHR request, and I use the sample from here, https://jp.igniteui.com/file-upload/multiple-upload, when I select multiple files, it will still send
two xmlhttp request.

Steps to reproduce

  1. Step 1
    open https://jp.igniteui.com/file-upload/multiple-upload
  2. Step 2
    select two files.
  3. Step 3
    Upload and check Network tab in Chrome developer tools,

Result

I hope there is an option to allow use the same XHRHttpRequest to upload multiple files.
just like in plain javascript, we can do like this.

function uploadFiles(files) {
    var xhr = new XMLHttpRequest();
    var formData = new FormData();
    xhr.onload = successfullyUploaded;
    xhr.open("POST", "http://localhost:3000/upload", true);
    xhr.setRequestHeader('X-Requested-With','XMLHttpRequest');
    for(var file in files) {
        formData.append("uploads", files[file].data);
    }
    xhr.send(formData);
}

Expected result

Add an option to allow to send multiple files in a single XHR request.

Attachments

here is a screenshot
2017-09-26 16 54 42

@gedinakova
Copy link
Contributor

gedinakova commented Jan 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants