I have the following code working:
MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
entity.addPart("userfile", new FileBody(f));
httppost.setEntity(entity);
HttpResponse response = httpclient.execute(httppost);
The problem is that the name of the File f
is "abc-temp.jpg" and I want it to be "xyz.jpg" when I upload it. I don't want to rename the file on the device though, only for uploading.
What is the best way to go about doing this?