Skip to content

Commit

Permalink
Adds the XMLHttpRequest object to the uploadFinished callback. RESTfu…
Browse files Browse the repository at this point in the history
…l APIs can and will use response headers quite extensively and they should be accessible in uploadFinished. In my case the API responds with a 201 Created and a link to the newly created resource in the Location-header.
  • Loading branch information
androa committed Mar 15, 2012
1 parent f758576 commit 368b814
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery.filedrop.js
Expand Up @@ -299,7 +299,7 @@
if (xhr.responseText) {
var now = new Date().getTime(),
timeDiff = now - start_time,
result = opts.uploadFinished(index, file, jQuery.parseJSON(xhr.responseText), timeDiff);
result = opts.uploadFinished(index, file, jQuery.parseJSON(xhr.responseText), timeDiff, xhr);
filesDone++;

// Remove from processing queue
Expand Down

0 comments on commit 368b814

Please sign in to comment.