I am using the Froala WYSIWYG editor to upload files to s3. Everything works fine as long as the files are less than 20 mb. I have set the Froala editor to accept files over 50 mb. However, whenever I try to upload a larger file I get the following response error from s3:
<Error>
<Code>EntityTooLarge</Code>
<Message>Your proposed upload exceeds the maximum allowed size</Message>
<ProposedSize>20974039</ProposedSize>
<MaxSizeAllowed>20971520</MaxSizeAllowed>
<RequestId>4292DB24BF022FC5</RequestId>
<HostId>C0QRzNxtazcS4NUQwvU89+QblW1MleMbLUNxoEAyjX2EuUmNUKXc3XbV+1K1GagBHOGBHHpB8ho=</HostId>
</Error>
I have file upload to s3 set up as follows:
fileMaxSize: 60 * 1024 * 1024,
fileUploadToS3: {
bucket: "<%= @hash[:bucket] %>",
region: "s3-us-west-1",
keyStart: "<%= @hash[:key_start] %>",
callback: function (url, key) {
},
params: {
acl: "<%= @hash[:acl] %>", // ACL according to Amazon Documentation.
AWSAccessKeyId: "<%= @hash[:access_key] %>", // Access Key from Amazon.
policy: "<%= @hash[:policy] %>", // Policy string computed in the backend.
signature: "<%= @hash[:signature] %>", // Signature computed in the backend.
}
}
It seems to be something from Amazon's size, but as far as I can tell, s3 supports uploads up to 5gb per file. What am I missing here?
// Policy string computed in the backend
can include a "content length range" that limits the size of any upload. Take a look at what you're using for the policy document and maybe include an example in the question so we can rule that in or out? – Michael - sqlbot