Get Width of Uploaded image when upload complete using UPLOADIFY Plugin
I want to get the wid开发者_开发百科th of an image when upload complete in uploadify and then make make the proportion correct with the previous one before upload
FOCUS: get the WIDTH of the uploaded image
//when all files finished uploading
'onAllComplete' : function(event,data) {
alert("action");
}
//when a file gets uploaded
'onComplete' : function(event, ID, fileObj, response, data) {
alert('There are ' + data.fileCount + ' files remaining in the queue.');
}
try
$("#imgID").css("width");
or
$("#imgID").width()
it will look like
$('#file_upload').uploadify({
$imgThis=$(this);
alert($imgThis.width());
'onComplete' : function(event, ID, fileObj, response, data) {
}
});
精彩评论