阅读它在目标元素的粘贴选项中提到“还包含文件列表”的文档 http://docs.fineuploader.com/integrating/options/fineuploaderbasic.html
这是什么?有一个很好的例子如何实现这个吗?这就是我到目前为止所拥有的。#pasteimage 是一个文本框。
使用 Chrome 10.6 我需要在 jquery.fineuploader-3.4.1.js 的某个地方打开它吗
$(document).ready(function(){
var thumbnailuploader = new qq.FineUploader({
element: $('#thumbnail-fine-uploader')[0],
request: {
endpoint: '/Admin/CFC/image-uploader.cfc?method=Upload',
params: {
profileID: '<cfoutput>#profile.ID#</cfoutput>',
profileType:'<cfoutput>#profile.Profile_Type#</cfoutput>',
subDName:'<cfoutput>#DecodeforHTML(profile.Subdomain_Name)#</cfoutput>'
},
},
multiple: true,
validation: {
allowedExtensions: ['jpeg', 'jpg', 'gif', 'png'],
sizeLimit: 102400, // 100 kB = 100 * 1024 bytes
itemLimit: 1,
stopOnFirstInvalidFile: false
},
text: {
uploadButton: "\+ Click or Drop"
},
paste:{
targetElement:$('#pasteimage')
},
callbacks: {
onComplete: function(id, fileName, responseJSON){
if (responseJSON.success) {
$('#thumbnail-fine-uploader').append('<img src="/<cfoutput>#profile.Profile_Type#</cfoutput>/<cfoutput>#profile.ID#</cfoutput>/' + responseJSON.filename + '" alt="' + fileName + '" style="width:120px;height:120px;">');
$('#thumbnail-fine-uploader').append('<br/><b style="color:red;">' + responseJSON.returnedProfileID + '<br/>'+ responseJSON.returnedprofileType+'<br/>'+responseJSON.returnedsubDName+'</b>');
}
}
},
onUpload: function(id, fileName){
$('#file-' + id).addClass('alert-info').html('<img src="/Images/loading.gif" alt="Initializing. Please hold."> ' +
'Initializing ' +
'“' +
fileName +
'”');
},
onProgress: function(id, fileName, loaded, total){
if (loaded < total) {
progress = Math.round(loaded / total * 100) + '% of ' + Math.round(total / 1024) + ' kB';
$('#file-' + id).removeClass('alert-info').html('<img src="/Images/loading.gif" alt="In progress. Please hold."> ' +
'Uploading ' +
'“' +
fileName +
'” ' +
progress);
}
else {
$('#file-' + id).addClass('alert-info').html('<img src="/Images/loading.gif" alt="Saving. Please hold."> ' +
'Saving ' +
'“' +
fileName +
'”');
}
},
})
});