Skip to content

Conversation

saurabytes
Copy link
Contributor

Background

RNFS is a great library to download and upload files. While trying to upload a file to S3 using a PreSigned PUT url, it was writing corrupt files as it was adding form boundary, meta data, etc to the file.

Fix

binaryStreamOnly: A newly added field in UploadFileOptions which is defaulted to false.
If this options is set true the uploader for RNFS will only write file binary data to the directed upload url. It omits all the meta data and form boundaries as they will write to the uploading stream essentially writing a corrupt file for the format provided.

@saurabytes saurabytes marked this pull request as ready for review June 27, 2019 14:29
@itinance
Copy link
Owner

This is a really good thing! Glad you find it out and fixed it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants