I am working on a java app, to upload images on yfrog.com.
I can post on the API page successfully but without binary files just with a string parameters.
Also the method I use only accept “String”.
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(data);
wr.flush();
wr.write(data); accept String only.
I tried to put the image path but it doesn’t work.
Do yourself a favor and take a look at Apache HttpComponents.