Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
aykarthik
Posts: 187
Registered: ‎08-13-2008
My Device: Not Specified

Static File Upload from Blackberry Device to Webserver

Hi,

 

Can anyone help me how to upload the static file from device to webserver?

 

Is is possible?

 

 

 

Thanks in advance.

 

Karthik A

New Developer
jcaple
Posts: 2
Registered: ‎07-21-2008
My Device: Not Specified

Re: Static File Upload from Blackberry Device to Webserver

Hi,

 

I would think this is possible.  Generally, I think it would go something like this:

 

* Open connection http connection with server

* Open FileInputStream to file on SDCard or something

* Get HTTP OutputStream

* Send file bytes to server [Server writes received bytes to a file]

* Close I/O streams

 

Developer
aykarthik
Posts: 187
Registered: ‎08-13-2008
My Device: Not Specified

Re: Static File Upload from Blackberry Device to Webserver

Hi, 

 

Thanks for your reply. I will try as you said.

Developer
aykarthik
Posts: 187
Registered: ‎08-13-2008
My Device: Not Specified

Re: Static File Upload from Blackberry Device to Webserver

Can anyone send a sample code for static file upload?

 

 

Thanks in advance

Developer
peter_strange
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: Static File Upload from Blackberry Device to Webserver

HTTPDemo in the samples supplied with the JDE does this I think, or something very similar that you should be able to modify.
Developer
aykarthik
Posts: 187
Registered: ‎08-13-2008
My Device: Not Specified

Re: Static File Upload from Blackberry Device to Webserver

Thank you very much. I think its really help for me.