0
看着文檔,我試圖發送一些值與圖像一起。不知道我是否有參數:在正確的位置。遇到問題並且不確定它是否在客戶端或服務器端。在提交中設置參數
<script>
$(document).ready(function(){
var thumbnailuploader = new qq.FineUploader({
element: $('#thumbnail-fine-uploader')[0],
request: {
endpoint: 'image-uploader.cfc?method=Upload'
},
params: {
foo: {
one: 'bar',
two: 'bar2'
}
},
multiple: true,
validation: {
allowedExtensions: ['jpeg', 'jpg', 'gif', 'png'],
sizeLimit: 102400 // 100 kB = 100 * 1024 bytes
},
text: {
uploadButton: "\+ Click or Drop"
},
callbacks: {
onComplete: function(id, fileName, responseJSON)
{
if (responseJSON.success) {
$('#thumbnail-fine-uploader').append('<img src="/Test/file2/files/' + responseJSON.filename +'" alt="' + fileName + '" style="width:150px;height:150px;">');
$('#thumbnail-fine-uploader').append('<b style="color:red;">' + responseJSON.foone +'</b>');
}
}
}
})
});
</script>
作品非常感謝 – user2116604
感謝您指出博客文章中的混淆。我假設你在討論[「在請求正文中包含參數或查詢字符串 」](http://blog.fineuploader.com/2012/11/include-params-in-request-body-or-query .html)博客條目。我剛剛更新了條目,爲示例代碼添加了更多上下文。 –