jQuery FileUpload doesn't trigger 'done'

后端 未结 7 915
陌清茗
陌清茗 2020-12-10 11:04

I use jQuery-File-Upload plugin. I wrote a simple code to test it - and it works, but not without problems. It doesn\'t trigger done, even if the file is upload

7条回答
  •  -上瘾入骨i
    2020-12-10 11:26

    Experimented today! If you're using PHP, be sure that your uploadhanler PHP file doesn't display error or warning. It creates a bad JSON output and when your file is uploaded, the plugin cannot send a correct JSON buffer with done event.

    For error tracking on your PHP file, it's better to write a log file instead of display errors on such scripts. You can use:

    error_reporting(0)
    

    But DO NOT FORGET to add error tracking in a log file. Of course !

提交回复
热议问题