react-native-fetch-blob icon indicating copy to clipboard operation
react-native-fetch-blob copied to clipboard

Read file in binary format

Open Sagaryal opened this issue 7 years ago • 2 comments

How do I read file in binary format? Is base64 format same as binary?

Sagaryal avatar Jan 21 '18 06:01 Sagaryal

What I saw with quick peek into code, when you provide encoding 'base64' in 'readFile' method, binary file will be returned to you in JS as a base64 string. For now you can't pass binary data thru RN bridge.

It depends what you wanna do with this binary file, but you should use it that way (or using some package) that it will be processed or open on native side instead passing thru bridge.

Read about base64, it's just a way to encode binary data that the result will be a string that uses limited set of ascii characters.

chrusart avatar Jan 22 '18 10:01 chrusart

So it is same or what i am using expo to upload some file and it require binary format to send it, is that mean i can use base64 too?

AppleMango23 avatar Jan 15 '19 12:01 AppleMango23