Created
January 27, 2015 17:30
-
-
Save dmitry-mukhin/4c19434a4e367da2963f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var multipleWidget = uploadcare.MultipleWidget("[role=uploadcare-uploader]"); | |
$ = uploadcare.jQuery; // skip this if you already have jQuery on the page | |
multipleWidget.onChange(function(group) { | |
if (group) { | |
group; // group object | |
group.files(); // array of file objects | |
$.when.apply(null, group.files()).then(function() { | |
arguments; // array of individual file infos | |
$.each(arguments, function() { | |
console.log(this.cdnUrl); // URL of uploaded file | |
console.log(this.uuid); // UUID of uploaded file | |
console.log(this.name); // original filename | |
}); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment