Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

iOS simulator - AWS S3 Upload small picture EntityTooLarge

$
0
0

I'm currently using AWS S3 upload, concerning picture upload, mostly small ones, ID Card, Shots, not large ones.On Real Devices (Android), the upload works well, however, on iOS Simulator, I'm keep having these errors :

"<?xml version="1.0" encoding="UTF-8"?><Error><Code>EntityTooLarge</Code><Message>Your proposed upload exceeds the maximum allowed size</Message>. <ProposedSize>50930</ProposedSize><MaxSizeAllowed>49156</MaxSizeAllowed>. <RequestId>...RequestId...</RequestId>. <HostId>....idHost....</HostId></Error>"

My file got a size indeed of 49156, and when doing the basics request, I'm using it, but when validate the upload on S3, I don't know why it's setting the size to 50930 (in the example above)...

My FormData looks like this :

data: FormData_parts: Array(10)0: (2) ["key", "users/blabla/kyc-blabla.jpg"]1: (2) ["acl", "private"]2: (2) ["bucket", "mybucket.eu"]3: (2) ["X-Amz-Algorithm", "AWS4-HMAC-SHA256"]4: (2) ["X-Amz-Credential", "credential"]5: (2) ["X-Amz-Date", "date"]6: (2) ["Policy", "policyInfos"]7: (2) ["X-Amz-Signature", "signature info"]8: (2) ["Content-Type", "image/jpeg"]9: Array(2)   0: "file"   1:     name: "6DC54103-30CE-4017-9BCA-65B4838BDAF4.jpg"     size: 49156     type: "image/jpeg"     uri: "6DC54103-30CE-4017-9BCA-65B4838BDAF4.jpg"

It works well on Android.


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>