FTP Upload problem (Solved)

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mrcoollion
Posts: 720
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

FTP Upload problem (Solved)

Post by mrcoollion » Tue Sep 26, 2017 10:22 am

Hope some one sees what I am doing wrong because I have a problem uploading a file with tsNetUploadFileSync.

I get connection with the server and the server gives the below shown information back but tResultCode keeps giving me the error 'tsneterr: (30) Could not resolve host: 21'.
The result is no file uploaded to my FTP server.

-- Server reply ---
220-FileZilla Server 0.9.53 beta
220 Welcome to FTP Server.
331 Password required for customerid
230 Logged on
257 "/" is current directory.
250 CWD successful. "/CST0000000001" is current directory.
221 Goodbye
-- End Server Reply -----

Code: Select all

 put "ftp://"&tLoginID&":"&tCustPW&"@"&tServer_IP&"/"&tSubFolderName&"/"&tUploadedFileName into tFTPUploadInfo 
    put "" into tHeaders ; put "" into tRecvHeaders; put "" into tResultCode ; put "" into tBytes ; put "" into tResult // Empty all the variables just to be sure
    tsNetSetFTPPort tFTPPort
    put tsNetUploadFileSync(theFilePath, \
          tFTPUploadInfo, tHeaders, \
          tRecvHeaders, tResultCode, tBytes) into tResult    
Anything I am doing wrong?

Regards,

Paul
Last edited by mrcoollion on Tue Sep 26, 2017 1:02 pm, edited 1 time in total.

mrcoollion
Posts: 720
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: FTP Upload problem

Post by mrcoollion » Tue Sep 26, 2017 12:17 pm

Found the reason for the problem.

I set the port to 21 with tsNetSetFTPPort
This was not necessary.
Setting tsNetSetFTPPort to "" makes it a passive transfer and that worked.

Regards,

Paul

Post Reply

Return to “Talking LiveCode”