Upload to amazon s3 error "EntityTooLarge" for 20 megabyte file
i am trying to upload a file directly to amazon s3, however after the upload completes i g开发者_Python百科et the following error:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>EntityTooLarge</Code>
<Message>
Your proposed upload exceeds the maximum allowed size
</Message>
<ProposedSize>5245254</ProposedSize>
<RequestId>645D7BA0DCC454D9</RequestId>
<HostId>
9ZX65MGwKi/hpe05eJuNp6mPgsRPZk54bplqX93ImjlLzojSesXCGRCZRjrkUDK8
</HostId>
<MaxSizeAllowed>5242880</MaxSizeAllowed>
</Error>
There seems to be a limit of 5242880 bytes for MaxSizeAllowed how can i change this limit from amazon's side. thanks for the help
I ran into this same problem using the carrierwave_direct gem and found this line in the documentation (placed in the carrierwave.rb initializer):
config.max_file_size = 10.megabytes # defaults to 5.megabytes
By changing the default I was able to upload a larger file.
It seems that you are using SOAP interface for file uploads.
Try to use REST interface instead:
http://docs.amazonwebservices.com/AmazonS3/latest/API/index.html?RESTObjectPUT.html
for files larger than 5 GB you need to use Multipart upload:
http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadInitiate.html
精彩评论