Get Width of Uploaded image when upload complete using UPLOADIFY Plugin

柔情痞子 提交于 2019-12-13 02:16:58

问题


I want to get the width 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


回答1:


//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) {

        }
});


来源:https://stackoverflow.com/questions/7186126/get-width-of-uploaded-image-when-upload-complete-using-uploadify-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!