I am currently working on an application named BlackBerry Contacts Sync and I am stuck at this point on how to sync Contact’s Image. How can images be stored in the database (MySQL) and how to retrieve them?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to store your images in the database instead of just a path to reference the image, the column that will hold your image need to be of BLOB type.
From your BlackBerry program (warning, untested):
So basically you use HttpConnection to setup the headers for a POST request, with multipart form data as content type. There are other headers that may be needed, to know exactly what you need (not BlackBerry specific) check the HTTP/1.1 protocol specification.
How to actually store the image into the database will depend on your server side implementation. This can be anything from PHP, ASP, JSP or any server side technology that allows you to talk to your MySQL instance.