jquery - Plupload get uploader object (v2.1.2) for file reader -



jquery - Plupload get uploader object (v2.1.2) for file reader -

i'm trying read selected file html5 file reader.

filesadded: function(up, files){ try{ var file = jquery('#'+uploader.id+'_html5').get(0).files[0]; var reader = new filereader(); reader.onload = function () { preview.find('.text').fadeout('fast', function(){ $(this).siblings('img').prop({src: reader.result}).fadein('fast'); }); } reader.readasdataurl(file); uploader.refresh(); } catch(e) { console.log(e.message); } },

in older versions of plupload uploader id jquery('#'+uploader.id+'_html5').get(0).files[0]

but have updated pluploader version 2.1.2 , not working now.

cannot read property 'files' of undefined

any idea?

by way, uploader defined plupload.uploader.

solution files

var file = files[0].getnative();

for still searching reply this;

solution more simple.

solution files variable in filesadded method;

var file = files[0].getnative();

and done. have file object itself.

html5 file reader accepts , reads easily.

jquery plupload

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -