Fine Uploader post to S3 returns response code 0

眉间皱痕 提交于 2019-12-13 04:30:43

问题


A customer with OSX Mountain Lion can't upload. Issue is present in both Safari and Firefox. I was able to get in remotely and grab some logs. Here is the console output:

[13:02:17.497] [FineUploader 3.8.2] Submitting S3 signature request for 0
[13:02:17.497] [FineUploader 3.8.2] Sending POST request for 0
[13:02:17.568] POST http://removed/signature [HTTP/1.1 200 OK 462ms]
[13:02:18.034] OPTIONS http://mybucket.removed/ [0ms]
[13:02:17.985] no element found @ http://removed/the/url/of/the/uploader
[13:02:17.979] [FineUploader 3.8.2] Sending upload request for 0
[13:02:17.984] [FineUploader 3.8.2] Received response status 0 with body: 
[13:02:17.986] [FineUploader 3.8.2] Waiting 5 seconds before retrying file.jpg...

The signature part seems to go fine. The post to Amazon just doesn't return anything. Is this a CORS issue? They claim to not be running any virus or security program on their computer. The computer is their own and is on their home network.

Here is the CORS configuration on S3

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
    <AllowedOrigin>removed</AllowedOrigin>
    <AllowedOrigin>removed</AllowedOrigin>
    <AllowedOrigin>removed</AllowedOrigin>
    <AllowedOrigin>removed</AllowedOrigin>
    <AllowedOrigin>removed</AllowedOrigin>
    <AllowedMethod>GET</AllowedMethod>
    <AllowedMethod>POST</AllowedMethod>
    <AllowedMethod>PUT</AllowedMethod>
    <AllowedMethod>DELETE</AllowedMethod>
    <MaxAgeSeconds>3000</MaxAgeSeconds>
    <ExposeHeader>ETag</ExposeHeader>
    <AllowedHeader>*</AllowedHeader>
</CORSRule>


回答1:


Your log message indicates that a response was in fact received, but it was completely empty. However, in your comments, you have indicated that no response was received at all. If that is true, then there are network issues. If the latter is true, then something client-side is interfering with the response, perhaps a browser extension.




回答2:


Super old question, but OP comments that the bucket name contains a ., which is likely related to the same issue as here:

When bucket names contain a dot, the endpoint needs to be:

s3-{region}.amazonaws.com/{bucket-name}

Without dots, the following works:

{bucket-name}.s3.amazonaws.com



来源:https://stackoverflow.com/questions/18561724/fine-uploader-post-to-s3-returns-response-code-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!