0

I'm using blueimp's jQuery File Upload and I'm trying to display what image is being uploaded at the moment (only the index, "Image 1 is being uploaded" for example).

I tried to use process to change a span element so it is displayed, but it did nothing. The option sequentialUploads is set to true.

I tried both

.bind('fileuploadprocess', function (e, data) {
  alert(data.index);
});

and

process:function(e,data){ alert(data.index); }

None of them worked. Tried others like processdone and processalways, but they did nothing also.

Thank you so much ❤

1
  • 1
    FYI, .bind() is deprecated, you should use .on(). Commented Jun 27, 2019 at 20:59

1 Answer 1

1

You can use:

.on('fileuploaddone', function (e, data) {/* ... */})

For successful upload requests (will also be called if the server returns a JSON response with an error property)

Example:

function (e, data) {
    // data.result
    // data.textStatus;
    // data.jqXHR;
}

*Read the official documentation

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.