Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 Multipart upload React Native #1924

Closed
jmparsons opened this issue Feb 9, 2018 · 4 comments
Closed

S3 Multipart upload React Native #1924

jmparsons opened this issue Feb 9, 2018 · 4 comments
Labels
guidance Question that needs advice or information.

Comments

@jmparsons
Copy link

jmparsons commented Feb 9, 2018

Can React Native do multipart / managed s3 uploads?

Trying to upload very large files from react native, 500mb+.

@jmparsons jmparsons changed the title S3 Mulitpart upload React Native S3 Multipart upload React Native Feb 9, 2018
@jeskew
Copy link
Contributor

jeskew commented Feb 13, 2018

I'm not a React Native expert, so you might want to cross-post this to Stack Overflow to see if you can get more opinions.

It looks like React Native just recently added support for blobs to their implementation, but the linked PR does not seem to have been included in any released version yet. Without Blob/File support, I believe you would need to get the contents of the file into JS memory and upload them as buffers or typed arrays. With files of that size, though, you might want to look into a native code solution that uploads a file using a presigned POST form or a presigned PutObject URL. You can also try the aws/amplify library, which has React Native-specific S3 abstractions.

@jeskew jeskew closed this as completed Feb 13, 2018
@jmparsons
Copy link
Author

Wow it finally got merged. Thanks @jeskew

@srchase srchase added guidance Question that needs advice or information. and removed Question labels Jan 4, 2019
@ngocketit
Copy link

@jmparsons Have you found any solution to this yet? Here is the piece of code I'm using to upload a large file but I still got Out of memory exception:

const data = await RNFetchBlob.fs.readFile(videoUri, 'base64')
Storage.put(fileName, data, ...)

@lock
Copy link

lock bot commented Sep 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

4 participants