Re-uploading a file with AJAX after it was changed causes net::ERR_UPLOAD_FILE_CHANGED in Chrome

后端 未结 6 1681
悲&欢浪女
悲&欢浪女 2021-02-02 18:32

I have a simple HTML form that sends an selected file via AJAX to an API endpoint.

If I do the following steps:

  1. Press the Upload button and make an POST r
6条回答
  •  情歌与酒
    2021-02-02 18:55

    Just reset the input type file after prompt messages or processing the data

    $('#file').val("");
    

提交回复
热议问题