I d like to upload a picture to a host like: http://imagerz.com/ .
Any sample for this? I can do a simple POST request, but how I can add the image content to my POST request?
I d like to upload a picture to a host like: http://imagerz.com/ . Any
Share
Here is a tutorial that tells you how to send a file via FTP to a server. File upload and download using Java
It shouldn’t be very hard to “port” that code into android. (You may have to change some of the classes/methods as some of them may not be implemented in Android’s lightweight VM).
There are also other image hosting services that should have an api that you could follow.
EDIT:
As you stated, you wanted to do this with a post request.
I found this great tutorial with the following code:
Source: http://www.theserverside.com/news/1365153/HttpClient-and-FileUpload
The same issues about porting this code to android as I stated above apply.