Need to upload a file using HttpPost in android
<pre><code>I would like to upload a name.txt file without ussing MultiEntitiy "importing a large file" as my file is small in size... I have written the following code but unable to upload a file.. thanks for your concern...

URL url = new URL(strUrl);
    HttpURLConnection conn = (HttpURLConnection) url.openConnection();
    conn.setDoInput(true); // Allow Inputs
    conn.setDoOutput(true); // Allow Outputs
    conn.setUseCaches(false); // Don't use a Cached Copy
    conn.setRequestMethod("POST");
    conn.setRequestProperty("userfile", strEmailAddress + ".txt");
    dos = new DataOutputStream(conn.getOutputStream());
    dos.writeBytes("Content-Disposition: form-data; name=\"paramName\"");
    Helper.printLogD(" connection " + conn.getContent().toString());

String temp = getStringFromInputStream(conn.getInputStream());
Helper.printLogI("temp" + temp);
</code></pre>
