title: Google Glass upload files using http-client
body: <p>I am trying to upload an image file using http-client from my Google Glass to my server but it always gets stuck at the <code>httpclient.execute()</code> method. I am not sure how should I approach uploading files from my Glass. This is what I have so far:</p>
  
  <pre><code>httpClient  = HttpUtils.getNewHttpsClient();
  postRequest = new HttpPost(strURL);  
  
  final File file= new File("mnt/sdcard/DCIM/Camera/12232.jpg"); 
  s = new StringBuilder(); 
  try
  {
  
      if(file.exists())
      {           
          final FileBody bin = new FileBody(file);  
          final MultipartEntity reqEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
  
          reqEntity.addPart("uid", new StringBody(username,Charset.forName("UTF-8")));    
          reqEntity.addPart("pwd", new StringBody(password,Charset.forName("UTF-8")));
  
          if(encKey!=null &amp;&amp; !encKey.equals(""))
              reqEntity.addPart("pvtkey", new StringBody(encKey,Charset.forName("UTF-8")));
  
          reqEntity.addPart("p", new StringBody(selectedDrivePath,Charset.forName("UTF-8")));
          reqEntity.addPart("ornt", new StringBody(fornt,Charset.forName("UTF-8")));
          reqEntity.addPart("file_size", new StringBody(strfilesize,Charset.forName("UTF-8")));
          reqEntity.addPart("data", bin);
  
          contentLength=reqEntity.getContentLength();
          postRequest.setEntity(reqEntity); 
  
          final HttpResponse response  = httpClient.execute(postRequest);
          ...
      }
      ...
  }
  ...
  </code></pre>
  
  <p>Where am I going wrong?</p>