jQuery File Upload - Multiple File Upload Widgets on the same page

做~自己de王妃 提交于 2019-12-12 19:22:00

问题


I have the same problem...all thing works fine but during upload but images preview not displaying.

I have looked the wiki page and I found a part of the problem. https://github.com/blueimp/jQuery-File-Upload/wiki/Multiple-File-Upload-Widgets-on-the-same-page

When the page load, the first request (http://localhost/uploads_icon/server/php/) is not realized when I change the id form (id="fileupload") for a class as it's shown in the wiki.

$(document).ready(function () {
$('.fileupload').each(function () {
    $('#fileupload').fileupload({
        uploadTemplateId:'template-upload-1',
        downloadTemplateId:'template-download-1'
    });
    $('#fileupload2').fileupload({
        uploadTemplateId:'template-upload-2',
        downloadTemplateId:'template-download-2'
    }); 
});

});

When I put the id="fileupload", the get request is perform but I can't have two forms with the same id and only the id="fileupload" allow the images preview displaying.

Anyone could have a trick?

Thanks

来源:https://stackoverflow.com/questions/12508989/jquery-file-upload-multiple-file-upload-widgets-on-the-same-page

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