Wyczyściłem i lekko zrefaktoryzowałem kod biblioteki FTP pod Apollo, zacząłem dodawać komentarze. Wczoraj mnie naszło na przerobienie tego na coś cairngormową modłę. Niby mamy model: w postaci klienta FTP, niby mamy komendy, a wręcz ich sekwencje, nawet część odpowiedzi można by sprowadzić do value objectów… Ale jakoś nie pasuje mi upychanie w ramy tego frejmłorku.
Ale jakoś do roboty zniechęca mnie temat socketów. Ponoć nic z tym nie zrobią, zatem wysyłanie plików będzie ssało niemiłosiernie, z racji braku informacji o postępie. Oczywiście mogę i będę to fake’ował paskiem postępu (nieokreślonego), ale co to za zabawa? Obejścia w stylu wysyłania niedużego pliku i szacowania prędkości upstreamu też mnie jakoś nie zachęcają.
Idę popłakać sobie w kącie.
Mali nie płacz, zawsze zostaje Ci metoda „na trzeciego” – osobnym kanałem sprawdzasz przez skrypt na serwerze, ile bajtów w danym pliku już się przegrało :)
maw
No to osobnym kanalem moge sie podlaczac osobnym klientem i pobierac wielkosc tyz ;)
W jaki sposob podchodzi apollo do uploadu plikow? Jest tez limitowany przez php.ini?
I got an error when it connect to host(IIS of Windows XP).
Wysylam: PASV
227 Entering Passive Mode (127,0,0,1,6,157).
Wysylam: LIST
125 Data connection already open; Transfer starting.
226 Transfer complete.
Error: Invoke error(Data connection already open; Transfer starting.
226 Transfer complete.)
at pl.maliboo.ftp.invokers::ListInv/pl.maliboo.ftp.invokers:ListInv::responseHandler() [C:\Flex201JP\ws_apollo\FlexFTP\pl\maliboo\ftp\invokers\ListInv.as:56]
@seth: To nie PHP;) Nie ma limitow, poza tymi ktore wyznacza sam Apollo. Zajrzyj w klase pl.maliboo.ftp.invokers::UploadInv
@Pepe: Strange. It’s happens right after connection and login? Or you’ve made dome actions before it. When I get IIS based server I’ll check it out.
Same thing here… it happens with IIS FTP Server and with every FTPCommand I try to execute.
Can you fix it maliboo ?? :)
I really need it !!! :)
220 Microsoft FTP Service
USER admiror
331 Password required for admiror.
PASS *****
230 User admiror logged in.
CWD admirorcentral
250 CWD command successful.
PWD
257 „/admirorcentral” is current directory.
TYPE I
200 Type set to I.
PASV
227 Entering Passive Mode (85,119,240,231,7,159).
RETR pc_gamme_688x680_12sec.swf
Error: Invoke error(Data connection already open; Transfer starting.)
at pl.maliboo.ftp.invokers::DownloadInv/pl.maliboo.ftp.invokers:DownloadInv::responseHandler()[D:\Flex2\Ad-MirorPlayer\pl\maliboo\ftp\invokers\DownloadInv.as:72]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()[C:\Documents and Settings\acrorel\Local Settings\Temp\aslibc-26332\EventDispatcher.as:184]
at pl.maliboo.ftp.core::FTPClient/pl.maliboo.ftp.core:FTPClient::handleData()[D:\Flex2\Ad-MirorPlayer\pl\maliboo\ftp\core\FTPClient.as:150]
125 Data connection already open; Transfer starting.
Ok I fixed the bug.
It is because you don’t handle the FTP code 125 ‘Data connection already open; Transfer starting.’ in the pl.maliboo.ftp.invokers::DownloadInv Class
Hi tere,
First, thank you very much for this great work !
I have a problem with a small xml file that I need to upload
Here is the file
and here is the error :
Error: Error #2030: Fin de fichier détectée. (EOF detected)
at flash.filesystem::FileStream/readBytes()
at pl.maliboo.ftp.invokers::UploadInv/::sendData()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at ()
at flash.utils::SetIntervalTimer/flash.utils:SetIntervalTimer::onTimer()[C:\Documents and Settings\acrorel\Local Settings\Temp\aslibc-28157\SetIntervalTimer.as:32]
at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
at flash.utils::Timer/flash.utils:Timer::tick()[C:\Documents and Settings\acrorel\Local Settings\Temp\aslibc-28157\Timer.as:158]
Same error with some other xml files.
My client config : WinXP, Flex 3 and AIR beta
And no idea of the ftp server config :/
Would you have any idea to solve this issue ?
Thanks !
i think there’s a problem with the parseFromListEntry method in FTPFile.as
I have a few folders with spaces in them and the parser returns the folder name with only the first word of the folder name ( i.e. „My Folder” is named „My” and is missing the word „Folder” in the directory listing )
line #57 reads : var name:String = fields[8];
i think it should be :
var name:String=”";for( var i:int = 8; i < fields.length; i++ ) name+= (fields[i]+((i!=fields.length-1)?” „:”"));
Hi mali,
I’m not so familiar with Adobe air.
Although i tried to get your ftpClient started in Flex 3.
But I got this error:
TypeError: Error #1009: Der Zugriff auf eine Eigenschaft oder eine Methode eines null-Objektverweises ist nicht möglich.
at pl.maliboo.ftp.invokers::UploadInv/responseHandler()[C:\Dokumente und Einstellungen\Pei Sei\Eigene Dateien\Testing\SawubonaWidget2\src\pl\maliboo\ftp\invokers\UploadInv.as:87]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at pl.maliboo.ftp.core::FTPClient/handleData()[C:\Dokumente und Einstellungen\Pei Sei\Eigene Dateien\Testing\SawubonaWidget2\src\pl\maliboo\ftp\core\FTPClient.as:148]
Any idea?
Thx!