title: How to upload Bitmap Image from a android device?
body: <p>Thank you in advance.
  I'd like to upload some bitmap image from my android app.
  but , I can't get it.
  Could you recommend some solutions for it.
  or collect my source code?</p>
  
  <pre><code>ByteArrayOutputStream bao = new ByteArrayOutputStream();
                  bitmap.compress(Bitmap.CompressFormat.JPEG, 90, bao);
                  HttpClient httpclient = new DefaultHttpClient();
                  HttpPost httppost = new HttpPost(
                          "http://example.com/imagestore/post");
                  MultipartEntity entity = new MultipartEntity( HttpMultipartMode.BROWSER_COMPATIBLE );
                  byte [] ba = bao.toByteArray();
                  try {
                      entity.addPart("img", new StringBody(new String(bao.toByteArray())));
                      httppost.setEntity(entity);
                  } catch (UnsupportedEncodingException e1) {
                      // TODO Auto-generated catch block
                      e1.printStackTrace();
                  }
                  // Execute HTTP Post Request
                  HttpResponse response = null;
                  try {
                      response = httpclient.execute(httppost);
                  } catch (ClientProtocolException e) {
  }
  </code></pre>