ng-file-upload
ng-file-upload copied to clipboard
multipart upload to s3
I looked at quite a few issues on multipart upload to s3 but none of them clearly indicated if the library supports it and some of them are quite old too. @danialfarid : can you please clarify/point me to an example of doing a multipart upload to s3 bucket with this library. Thanks.
Do we have any input on this? I also have a use case to upload a file (> 5GB) from browser using this library. I am get the following error on uploading a file greater than 5 GBs. We need to upload using multipart uploads if the file size id greater than 5 GB
<Error>
<Code>EntityTooLarge</Code>
<Message>Your proposed upload exceeds the maximum allowed size</Message>
<ProposedSize>25063886961</ProposedSize>
<MaxSizeAllowed>5368730624</MaxSizeAllowed>
<RequestId>XXXXXXXX</RequestId>
<HostId>e4nlABVQFOV2kPmIo14o2CX3ZGt2IN5KAnvNUOxUegecQPykCUhezFs5kKE9s9nep8mYCl0K7+0=</HostId>
</Error>
I am using following code snippet. Note: I have set the content-range to 25 GB in the policy
Upload.upload({
url: result.url, //s3Url
transformRequest: function(data, headersGetter) {
var headers = headersGetter();
delete headers.Authorization;
return data;
},
fields: result.fields, //credentials
method: 'POST',
file: files[i]
}).progress(function(evt) {
evt.index = i;
deferred.notify(evt);
}).success(function(data, status, headers, config) {
result.index = i;
deferred.resolve(result);
}).error(function(err) {
deferred.reject(err);
});