By Peter Bell

Anyone seen an FTP implementation in AS3 using Sockets API?

I'm a complete Flex/Apollo newbie, but from what I understand it is possible to implement FTP commands in AS3 using the Sockets API (which I believe is available in Flex - not just Apollo). Was wondering if anyone has seen a library that does this yet?

Hoping to create an Apollo component application for local file browsing and uploading using RFC959 FTP (including the "REST"art command for resuming uploads).

Let me know if you see anything and apologies if this is something that is out there - couldn't find anything via Google . . .

Comments
http://projects.maliboo.dmkhosting.net/FlexFTP/
;) It's currently in early alpha stage, but basic functions: upload/download, dir list are implemented.
# Posted By maliboo | 5/11/07 8:41 AM
# Posted By maliboo | 5/11/07 8:51 AM
I don't get it...

the whole purpose of making an FTP component is to actually implement the FTP protocol, the hard part

just doing the UI to browse locally is the easy part that anyone can do
# Posted By zwetan | 5/11/07 10:52 AM
Hi Zwetan, So what is your question?!
# Posted By Peter Bell | 5/11/07 11:33 AM
arf ...

when I said "I don't get it" it was a nice qay to tell you I find it stupid to plan on implementing a FTP component without willing to implement the FTP RFC...

again, implementing the FTP protocol would be the WHOLE interest of building that FTP component,
just reusing an already existing FTP library would have no point.
# Posted By zwetan | 5/11/07 11:59 AM
Why? I'm not looking to write an FTP component. I have a client that needs a pretty box that pops up and lets them select files that then magically appear on the server. They need me to wrap that with certain security and business rules. Why would I want to write an entire FTP component from scratch when I could solve the problem in a fraction of the time using an FTP library (whether commercial or OSS)?

Do you use other peoples operating systems or do you write your own? I get that if I was trying to sell an FTP component to Flex/Apollo developers, a 200 line MXML wrapper around an OSS FTP library probably wouldn't be worth much, but I build business apps for end users who don't care how much work I do - they just want to know how quickly and cheaply they can get the funcitonality.

Oh, ad I'm primarily a back end developer. I have written my own Data Mapper, Dependency Injection system and MVC framework because for my use case it was worth the large amount of time it took to write those. The Apollo stuff I'm looking for RAD all the way!

Make any more sense?!
# Posted By Peter Bell | 5/11/07 12:05 PM
@zwetan:
I don't understand your question too;) Actually the hardest part is to get the status of uploading data because of: http://tech.groups.yahoo.com/group/flexcoders/mess...

I've few workarounds in plans:
- determine upstream (sucks)
- upload n-kB disconnect, check size, and REST (sucks lesser, but slows upload)
- make second connection and check filesize (sucks if restricted to 1). Because you cannot send command while up/downloading on passive port:(

Of course there is BLOCK transfer mode, BUT: it's not implemented in most modern FTPs ;(
# Posted By maliboo | 5/11/07 12:14 PM
the way you put your post it looked like you were looking for an FTP library to build a FTP component ... so other people can reuse that component

and as you said "a 200 line MXML wrapper around an OSS FTP library probably wouldn't be worth much" so I think we agree.

from the top of my head:
- use Zinc2, it have a ftp.dll that you can reuse
- find a way to make apollo talk to an exe, look for Artemis, and reuse ftp.exe or better ftps.exe (MoveIt Freely)
etc...

as now there is no simple and elegant solution as a fully implemented FTP protocole (that would be the real solution)
# Posted By zwetan | 5/11/07 12:22 PM
Sound like we are in violent agreement then! Thanks for the ideas, and I'm going to keep an eye out for components - including the http://maliboo.pl/projects/FlexFTP/ linked to above.
# Posted By Peter Bell | 5/11/07 12:42 PM
@zwetan, That would be why I'm glad it is you, not me working on the problem :-> Guess we all pick our problem spaces to torture ourselves with . . .
# Posted By Peter Bell | 5/11/07 12:56 PM
@Maciej - Hey, looks like Ted Patrick just saw your project - congrats. Please keep me posted - seems like exciting stuff :->
# Posted By Peter Bell | 5/11/07 6:22 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.005.