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
dx22
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

FTP support?

Is the File Transfer Protocol (FTP) supported and can you programmatically upload a file to a server through FTP?

 

Any links with code and information will be appreciated.

----------------------------------------------------------------------
Press the button to give kudos if I helped you :smileyhappy:
Please use plain text.
Developer
simon_hain
Posts: 15,947
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: FTP support?

there is no API for that built in, but you can check out some j2me FTP clients i guess.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
dx22
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

Re: FTP support?

OK thanks. Do you know any more popular j2me libraries which I could try to port?
----------------------------------------------------------------------
Press the button to give kudos if I helped you :smileyhappy:
Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: FTP support?

One issue with FTP access on the BB can be file size.  BIS-B and BES connections go through RIM's proxy and it will kill a connection after a certain number of bytes are sent during a connection.  FTP is not restartable too, which makes this a little difficult....

 

Anyway, I wrote this last year and meant to publish it but never got round to it because I thought the approach was flawed.  If you find it useful or find any bugs let us know, perhaps you can publish a correction.....

 

Free to use code.  Don't ask me any questions and expect instant answers, I have not looked at this code in a year....

Please use plain text.
Developer
dx22
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

Re: FTP support?

Nice! Thanks very much. I will take time and test it during the next few days.

It worries me a little what you said about file size limitations. Is this only applicable for BIB-B and BES connections or it applies to all transports?

And do you have a rough idea how much can you transfer before the connection is killed - 1MB, 10MB?

Thanks again
----------------------------------------------------------------------
Press the button to give kudos if I helped you :smileyhappy:
Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: FTP support?

The size transferred depends on the settings in the proxy.  Used to be quite small, but now I think the default BES setting is in the 1MB region.  As noted, Carrier, WiFi and WAP do not have this restriction.  The killer for me was the lack of restart in FTP. 

Please use plain text.
Developer
dx22
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

Re: FTP support?

Ok its good to know that at least through wifi you can transfer larger files.

By lack of restart you mean you cannot restart the file upload and if for some reason the upload fails you might end up with corrupted file on the server? Or I misunderstood this?
----------------------------------------------------------------------
Press the button to give kudos if I helped you :smileyhappy:
Please use plain text.
Developer
simon_hain
Posts: 15,947
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: FTP support?

resume is a ftp feature as far as i know. not all servers implement it correctly though.

see http://www.ietf.org/rfc/rfc0959.txt
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: FTP support?

Can you point me at a spec Simon?  If I can implement something standard it makes the project worth doing....

Please use plain text.
Developer
simon_hain
Posts: 15,947
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: FTP support?

http://cr.yp.to/ftp/retr.html maybe?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.