blueimp jQuery-File-Upload without ajax

◇◆丶佛笑我妖孽 提交于 2019-12-03 03:27:26

You can submit files through a standard form submit using the blueimp jQuery-File-Upload by setting the replaceFileInput option to false.

From the documentation:

By default, the file input field is replaced with a clone after each input field change event. This is required for iframe transport queues and allows change events to be fired for the same file selection, but can be disabled by setting this option to false

Use config replaceFileInput = false;
jQuery('#add_new_product_form').fileupload({
            // Uncomment the following to send cross-domain cookies:
            //xhrFields: {withCredentials: true},
            fileInput: jQuery('#upload-video'),
            replaceFileInput: false,
            ......
})

And controller you will get $_FILES to get video data.

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