FTP Upload

vinod1
Posts: 12
Joined: Mon Oct 22, 2001 12:07 am

FTP Upload

Post by vinod1 »

Hi,
I was trying to upload a file thru FTP using the vortex SUBMIT function. But it is returning an error stating that 'File not found in location'. I've gave the code as follows.
<SUBMIT URL="ftp://192.168.0.69/" CONTENT-TYPE="text" METHOD=PUT FROMFILE="c:\sample.txt" TOFILE="sample.txt" >
Is there anything wrong in what I've given. Please help me.

Vinod
User avatar
mark
Site Admin
Posts: 5515
Joined: Tue Apr 25, 2000 6:56 pm

FTP Upload

Post by mark »

vinod1
Posts: 12
Joined: Mon Oct 22, 2001 12:07 am

FTP Upload

Post by vinod1 »

Hi,
Still I am not getting it worked. The scenario is as follows. I have thunderstone running on SERVER-A. I have an FTP server running on SERVER-B. I am working from a client machine (CLIENT-A) and connecting to the thunderstone server (SERVER-A). My requirement is to check whether it is possible to FTP a file (either from SERVER-A or from CLIENT-A) to the FTP server (SERVER-B).
I will be thankfull if some sample code is given.

Regards
Vinod
User avatar
mark
Site Admin
Posts: 5515
Joined: Tue Apr 25, 2000 6:56 pm

FTP Upload

Post by mark »

vinod1
Posts: 12
Joined: Mon Oct 22, 2001 12:07 am

FTP Upload

Post by vinod1 »

Thanks Mark..It works fine now. I was unable to login to FTP sites which doesn't support anonymous login. Later I got it by specifying username and password in the URL control parameter
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

FTP Upload

Post by sourceuno »

Can I use a similar method using SUBMIT to run FTP that uses a text file containing FTP commands (ie: ftp -s:commandtextfile.txt 192.168.0.1)?
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

FTP Upload

Post by Kai »

Nope. The FTP command must be given via METHOD, and only GET, PUT and DELETE are currently supported for FTP. You would have to parse the file yourself, eg.:

<readln row s:\commandtextfile.txt>
<$line = $ret>
... parse $line for url and command ...
<submit method=$parsedmethod url=$parsedurl>
... error check ...
</readln>

(Also note that CONTENT-TYPE is ignored for FTP URLs, as there's no way in the protocol to set it.)
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

FTP Upload

Post by sourceuno »

Since CONTENT-TYPE is ignored, can I still ftp files other than text files, such as Texis tables?
User avatar
mark
Site Admin
Posts: 5515
Joined: Tue Apr 25, 2000 6:56 pm

FTP Upload

Post by mark »

You can ftp any file. Content is irrelevant.
aitchon
Posts: 118
Joined: Mon Jan 22, 2007 10:30 am

FTP Upload

Post by aitchon »

I'm trying to ftp a file using this:

<submit url="ftp://username:password@someipaddress" method=put fromfile="test.txt">

I get this error:

Cannot resolve host 'username': Nameserver query timeout
Post Reply