简体   繁体   中英

Unique id for blueimp file uploader

Im using blueimp uploader for file upload things and i have tried to get a unique id for very set of images but i end up getting a unique id for each file upload

i have tried to add it through the handle_file_upload function but each time its calling it and hence getting a new id everytime

any help would be appretiated guys

thanks

just count with own var. don't use index from function.

var i=0; // global!
....
$.each(data.files, function (index, file) {
    $i++;
    $('<p>Here is your ID:' + i+'</p>').appendTo('#container'); // e.g.
    ...
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM