Closed lnghrdntcr closed 6 years ago
Hi, none of the above, the input file must be a file saved on your app storage. IOS and Android won't read you relative or absolute computer path, instead they will look on the user's device.
Thank you for your answer! So I should be saving first the image to the local storage and than converting it to base64!
Yes exactly ! But in your case, if you already have the image in your development folder, why would you need to convert it ?
Usually we use this lib to convert an image taken by the camera, meaning not initially in the development folder.
Anyways, if that is your need, you can use react-native-fs to save the image to your storage :)
Thank you for your support! I'll close the issue.
Noob here, I can't understand how to use
file://
. Should I be giving it the full path (/home/user/...
), the project path relative to the root of the project (src/images/...
) or the relative path from the component in which I call the function?