title: Android - Send local file via HTTP post
body: <p>I'm trying to send a local file (<strong>music or video only</strong>) via HTTP post with this line</p>
  
  <pre><code>InputStreamEntity reqEntity = new InputStreamEntity(
     new FileInputStream(file), -1);
  </code></pre>
  
  <p>However, first I need to get a File object that corresponds to the file. I use an Intent to pick a file. In my <code>onActivityResult()</code>, I'm able to retrieve the Intent data. When doing <code>data.getData()</code>, I obtain a path that looks like <code>content://....</code> I tried many things with the method <code>getContentResolver</code> (from <code>Activity</code>), but I can't make it work. </p>
  
  <p>Can any one tell me what's wrong on it?</p>