My current implementation is this:
1. User takes a photo in the app
2. Photo is converted to base64, stored inside local SQLite file.
3. When user is done, they press the upload button
4. The app will save all the images taken to the user's photo gallery
5. I start a service that will loop through the SQLite file and create a JSON for each row and then use okhttp to send the JSON data to the server
6. The server is a PHP server, it receives the JSON and converts base64 back to an image
7. The PHP server will use other data in the JSON to manipulate the image if needed and then save to a folder on the server.
This has worked fine for me for a while now but there has been some issues, like the app crashing because the cursor is too large (over 2MB).
I found this post here that explains and give a great fix: https://www.b4x.com/android/forum/t...ry-to-avoid-sqlite-errors.142048/#post-900231
However, it seems like storing 100+ images as base64 is not the way to go.
If I have full control over the server and the app, what would be the best practices storing and uploading the images?
1. User takes a photo in the app
2. Photo is converted to base64, stored inside local SQLite file.
3. When user is done, they press the upload button
4. The app will save all the images taken to the user's photo gallery
5. I start a service that will loop through the SQLite file and create a JSON for each row and then use okhttp to send the JSON data to the server
6. The server is a PHP server, it receives the JSON and converts base64 back to an image
7. The PHP server will use other data in the JSON to manipulate the image if needed and then save to a folder on the server.
This has worked fine for me for a while now but there has been some issues, like the app crashing because the cursor is too large (over 2MB).
I found this post here that explains and give a great fix: https://www.b4x.com/android/forum/t...ry-to-avoid-sqlite-errors.142048/#post-900231
However, it seems like storing 100+ images as base64 is not the way to go.
If I have full control over the server and the app, what would be the best practices storing and uploading the images?