http://www.uploadify.com/documentation/ 


원래 사용법
  1.  $('#file_upload').uploadify({
  2.     'uploader'  : '/uploadify/uploadify.swf',
  3.     'script'    : '/uploadify/uploadify.php',
  4.     'cancelImg' : '/uploadify/cancel.png',
  5.     'folder'    : '/uploads',
  6.     'auto'      : true
  7.   });

아래는 임의로 변경한 방법


function uploadify(id, queueId, callback, folder, fileDesc, fileExt) {
$(id).uploadify({
queueID : queueId,
folder : folder,
auto : true,
multi : true,
fileDesc: fileDesc ? fileDesc : "이미지,문서",
        fileExt: fileExt ? fileExt : "*.jpg;*.jpeg;*.png;*.gif;*.xls;*.xlsx;*.ppt;*.pptx;*.doc;*.docx;*.pdf;*.hwp",
onComplete : function(event, ID, fileObj, response, data) {
var jsonData = toJson(response);
if(typeof callback == 'function') {
callback.call(this, id, jsonData);
}
}
});
}

사용법
uploadify("#uploadify", "fileQueue", uploadifyCallback, "/upload", "이미지,문서", "*.jpg;*.jpeg;*.png;*.gif;");

업로드 할게 여러개면 여러개 지정

 
Posted by [czar]
,