How to Upload images without Base64 encoding
Posted by metow on November 15, 2012 at 11:21pm
In my android application , I can upload files to my Drupal 6 server using services module file resource in which I first Base64 encode the file and send it via a StringEntity as follows:
HttpClient httpClient = new DefaultHttpClient(connectionParameters);
HttpContext localContext = new BasicHttpContext();
JSONObject json = new JSONObject();
json.put("file", Base64.encodeToString(photodata,Base64.DEFAULT));
json.put("uid", getUid());
json.put("filename", file_name);
StringEntity se = new StringEntity(json.toString());
Read more