In my app, a user could take or upload 1 to 5 photos.
To achieve that process I use the cordova camera plugin. I also, before uploading them to my server (S3), allow the user to crop them within the help of cropperjs.
Right now I implemented everything purely based on base64 images which I save in a service till the upload to the server is done.
I read (somewhere) that it is quite a bad practice to use base64 with camera because there is a risk of reaching an out of memory exception. Is that right? Any thought on that?
And if I should rather use local files, what should I rather use when I configure the cordova camera plugin, rather NATIVE_URI or FILE_URI? Any good post or tutorial about that subject?
***** Update: So I tried NATIVE_URI and FILE_URI and seems that FILE_URI works better in my case. I also have the feeling that the quality of the pictures are better with FILE_URI
Still, after having a FILE_URI, I use cropper, which gonna give me back a base64 URI.
So my question, is it safe to keep in my service memory up to 5 images as base64 or is there an out of memory possibility? If yes, what should I do then, save the images to a tmp file on the device till I upload the photos to my server?