Redirecting before POST upload has been completed

前端 未结 3 1326
名媛妹妹
名媛妹妹 2021-02-07 03:38

I have form with file upload. The files to be uploaded actually are pictures and videos, so they can be quite big. I have logic which based on headers and first 1KB can determin

3条回答
  •  梦如初夏
    2021-02-07 04:16

    1. use PCEL uploadprogress extension if you use apache
    2. create an file to poll meta via Ajax, and return trueor false based on your condition, you could also get the temp_name file and check for the 1kb meta.
    3. the ajax call need to be binded with an function which uses HTML meta-refresh headers to redirect or stay until the uploads done.


    Checkout the uploadprogress examples.

提交回复
热议问题