Android Question Put SQLite BLOB into MySQL BLOB using PHP

Kevin Hartin

Member
Licensed User
I have an app that stores an image in a SQLite BLOB and happily retrieves and displays it in a form. However I need to push that up to a PHP Webserver and store it in the corresponding MySQL BLOB field.

Do I have to retrieve the BLOB, store it locally as a file then Post it to the Server for storage and subsequent conversion to a format for insert as a BLOB?

Or can I simply take the blob data and send it to the server without all the file conversion, etc
 

KMatle

Expert
Licensed User
Images should be stored on the filesystem of the server. Only the index is stored in the db. You can convert the content to a base64 string and send it. Search for multipart or php & image or read bytes from file. There are some examples. Strings are easier to handle.
 

Kevin Hartin

Member
Licensed User
Images should be stored on the filesystem of the server. Only the index is stored in the db. You can convert the content to a base64 string and send it. Search for multipart or php & image or read bytes from file. There are some examples. Strings are easier to handle.
OK, I can already do that, but why not store them in the DB as a BLOB?
 
Top