blueimp jquery file upload - “done”, “complete” callbacks not working for IE 9

前端 未结 3 1989
难免孤独
难免孤独 2020-12-17 15:49

I am using Blueimp Jquery File Upload plugin to upload files asynchronously. It works well in most other browsers (with a few minor issues) - on IE, I see this issue that th

相关标签:
3条回答
  • 2020-12-17 16:29

    In case anyone is still having this issue with direct upload to S3 the solution is to add a success_action_status field with the value of "201". Make sure that that you include it as part of the policy data as well since they have to match.

    Apparently when receiving the upload from IE9 S3 will return an empty string. To get it to return XML, which the file uploader needs, you have to tell it return a status of 201.

    0 讨论(0)
  • 2020-12-17 16:37

    The done event gets fired if the content-type of the response is set to "text/html" or "text/plain" (instead of application/json) when json is being returned from the server. This applies only for browsers that do not support XHR file upload (such as IE9) and where the blueimp plugin is using IFrame transport instead.

    Related info under "Content Negotiation" in the plugin documentation: https://github.com/blueimp/jQuery-File-Upload/wiki/Setup

    0 讨论(0)
  • 2020-12-17 16:46

    For the record, I ran into this problem when uploading direct to S3, now that their CORS feature allows for that.

    The solution was to set success_action_status to '200', and then the Done event was triggered correctly.

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