blueimp jQuery-File-Upload without ajax

前端 未结 2 1610
深忆病人
深忆病人 2021-02-05 22:32

I really love the client side processing of selecting a file and having a preview with the option to cancel or delete.

However i want to upload the page with a form and

相关标签:
2条回答
  • 2021-02-05 23:09
    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.

    0 讨论(0)
  • 2021-02-05 23:11

    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

    0 讨论(0)
提交回复
热议问题