Amazon S3 POST, event when done?

前端 未结 2 1826
太阳男子
太阳男子 2021-01-02 17:33

I\'m using Amazon S3 with a simple project, when the user uploads a file, I first use an XMLHTTPRequest to send the details to my database, then trigger the form POST that u

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-02 17:52

    Amazon S3 won't trigger any kind of event, but your XMLHTTPRequest code should be able to trigger a callback when S3 returns an HTTP 200 status code.

    If S3 isn't returning a successful response code, it's quite possible that S3 doesn't know that your upload is complete. Are you sending a Content-Length header as part of your request?

提交回复
热议问题