android use Multipartentity to upload a .txt file to server
<p>I try to upload a text file using MulitPartEntity but unable to upload .. my code is mention below please help me..</p>

<pre><code> File file = new File("/sdcard/" + strEmailAddress + ".txt");
    HttpClient httpclient = new DefaultHttpClient();

                HttpPost httppost = new HttpPost(strUrl);


        MultipartEntity reqEntity = new MultipartEntity(
                    HttpMultipartMode.BROWSER_COMPATIBLE);

            if (file.exists()) {
                Helper.printLogD(" file is exist ");
            }
            FormBodyPart bodyPart = new FormBodyPart("userfile",
                    (ContentBody) file);


        reqEntity.addPart(bodyPart);


        httppost.setEntity(reqEntity);

HttpResponse response = httpclient.execute(httppost);
</code></pre>
