How to upload images to a computer ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, August 11, 2011 05:27 AM

I want to upload images from a j2me application to a computer. I used a HttpConnection to do it , but I did not find the file on the computer. So how to successfully upload the image ? Here is my code : private void transfererPhoto() { HttpConnection http = null; OutputStream os = null; int rc; try { http = (HttpConnection) Connector.open("http://192.168.1.123/"); http.setRequestMethod(HttpConnection.POST); http.setRequestProperty("If-Modified-Since","7 Sep 2005 19:43:31 GMT"); http.setRequestProperty("User-Agent","Profile/MIDP-2.0 Configuration/CLDC-1.0"); http.setRequestProperty("Content-Language&   More>>

I want to upload images from a j2me application to a computer. I used a HttpConnection to do it , but I did not find the file on the computer. So how to successfully upload the image ? Here is my code :


			
private void transfererPhoto()
{
HttpConnection http = null;
OutputStream os = null;
int rc;
try {
http = (HttpConnection) Connector.open("http://192.168.1.123/");
http.setRequestMethod(HttpConnection.POST);
http.setRequestProperty("If-Modified-Since","7 Sep 2005 19:43:31 GMT");
http.setRequestProperty("User-Agent","Profile/MIDP-2.0 Configuration/CLDC-1.0");
http.setRequestProperty("Content-Language", "en-US");
os = http.openOutputStream();
os.write((byte[])vRawPhotos.elementAt(0));
os.flush();
} catch (IOException ex) {
afficheAlert("Une erreur d'entrée-sortie s'est produite !");
}
finally{
try
{
os.close();
http.close();
}
catch(IOException e)
{
}
}
}
   <<Less

Re: How to upload images to a computer ?

Posted By:   alexvesp123  
Posted On:   Wednesday, June 13, 2012 09:38 AM

Hi, i can help you, write me alexvesp123@hotmail.com

also there is an app that does what you want at this page

http://javamobilesolutions.com:8084/portal/  

regards

About | Sitemap | Contact