title: java.io.FileNotFoundException caught when processing request: /document/raw:/storage/emulated/0/Download/mypdf.pdf (No such file or directory)
body: <p>I want to send pdf to my server using multipart request. i am able to choose file correctly and get its name but when i am sending this pdf , i am sending following path <code>/document/raw:/storage/emulated/0/Download/kitchenapp.pdf</code> .  path is correct and file is there , yet i got this exception . <code>I/DefaultRequestDirector: I/O exception (java.io.FileNotFoundException) caught when processing request: /document/raw:/storage/emulated/0/Download/kitchenapp.pdf (No such file or directory)</code> </p>
  
  <p>what i have done so far .. Get pdf by this </p>
  
  <pre><code> Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
      intent.setType("application/pdf");
      intent.addCategory(Intent.CATEGORY_OPENABLE);
  
      try {
          startActivityForResult(
                  Intent.createChooser(intent, "Select a File to Upload"),
                  1);
      } catch (android.content.ActivityNotFoundException ex) {
          Toast.makeText(getActivity(), "Please install a File Manager.",
                  Toast.LENGTH_SHORT).show();
      }
  </code></pre>
  
  <p>get onActivity result by this</p>
  
  <pre><code>@Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
      // TODO Auto-generated method stub
      super.onActivityResult(requestCode, resultCode, data);
      if (requestCode == 1 &amp;&amp; resultCode == RESULT_OK &amp;&amp; data != null &amp;&amp; data.getData() != null) {
          Uri selectedFileURI = data.getData();
           file = new File(selectedFileURI.getPath().toString());
          Log.d("", "File : " + file.getName());
          String uploadedFileName = file.getName().toString();
          System.out.println("upload file name "+uploadedFileName);
  
          System.out.println("my location "+file);
  
  
  
      }
  }
  </code></pre>
  
  <p>sending this file via multipart request </p>
  
  <pre><code>  if (file != null ) {
  
  
                  entity.addPart("file", new FileBody(file));
              }
  
              // totalSize = entity.getContentLength();
              httppost.setEntity(entity);
  
              // Making server call
              HttpResponse response = httpclient.execute(httppost);
              HttpEntity r_entity = response.getEntity();
  </code></pre>
  
  <p>any help would be appreciate..</p>