Why Blueimp's JQuery File Upload add all prev. selected files even if options [replaceFileInput: false] and [maxNumberOfFiles: 1] are set on init?

自闭症网瘾萝莉.ら 提交于 2019-11-30 20:34:47
Charkm4

I had the same problem, my solution was to unbind the click event of my button and bind it back whenever the add event is called. Try This.

...

add: function (e, data) {

        $('#upload_button').unbind('click');
        data.context = $('#upload_button').bind('click', function () {
                    ...
                    data.submit();
        }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!