Bu ftp sunucusundan (ftp.cetip.com.br)/MediaCDI/adıyla "20160412.txt" adı verilen bir dosya almam gerekiyor.ftp ile dosya alın cfftp (coldfusion)
Tüm adres ftp://ftp.cetip.com.br/MediaCDI/20160412.txt'dur. Bu açık bir ftp'dir, ancak cfftp bağlanmak için bir kullanıcı ve şifre gerektirir. Bu gibi bir şeyi atlamayı denedim:
Ancak bu bir özellik hatası döndürür.
Attribute validation error for tag CFFTP.
It has an invalid attribute combination: action,localfile,remotefile,server. Possible combinations are:
Required attributes: 'action,localfile,password,remotefile,server,username'. Optional attributes: 'asciiextensionlist,attributes,buffersize,failifexists,fingerprint,passive,port,proxybypass,proxyserver,result,retrycount,secure,stoponerror,timeout,transfermode'.
....
Kullanıcı olmadan nasıl yapabilirim?
UPDATE Teşekkürler Leigh ve P Mascari. Ben
<cfftp connection="Myftp"
server="ftp.cetip.com.br"
username = "anonymous"
password="[email protected]" <!--- valid email --->
action="Open"
stoponerror="Yes"
secure="no">
<p>Did it succeed? <cfoutput>#cfftp.succeeded#</cfoutput><br />
<cfflush>
<cfftp connection="Myftp"
action="changedir"
directory="MediaCDI">
changed<br />
<cfflush>
<cfftp connection="Myftp"
action="getFile"
remoteFile="20160412.txt"
localfile="#Session.wwwrootPath#Temp\teste.txt"
timeout="3000">
done!!<br />
<cfflush>
Error: 425 Unable to build data connection: Connection timed out . My problem now is in the third part, i can connect whith anonymous, change dir, but the action getFile timed out. Any idea?