Upload and server FTP

F

Fabrice

I'm creating a website to allow user to upload file on my FTP server.
I need to get the filename, the extention and the local path of this one to
begin the upload process to my FTP server and not on my web server. What is
the best way to get these informations.
Can I use the upload control to have informations about he file and do a ftp
transer with FTPWebRequest ?
Or is there a best method ?

thanks
fabrice
 
S

Stan

I'm creating a website to allow user to upload file on my FTP server.
I need to get the filename, the extention and the local path of this one to
begin the upload process to my FTP server and not on my web server. What is
the best way to get these informations.
Can I use the upload control to have informations about he file and do a ftp
transer with FTPWebRequest ?
Or is there a best method ?

thanks
fabrice

A better method is the WebClient.UpLoadFile(filename, address)
The address (Url) can include the ftp:// prefix so it handles all the
ftp interaction automatically.

The file supplied by the user via the FileUpload control will only
have the filename in the request header (FileUpload.FileName property)
not the local path (on the client machine that is).
Use the FileUpload.SaveAs() method to save a local copy and then do
the upload to the ftp server from there.

HTH
 
C

Chris Salter

Just so we're one the same page

1. User initiates upload via http page
2. file details are checked / verified
3. file is sent to ftp server

is this correct?

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

FTP upload for aspx page 1
FTP problems 3
Uploading file using FtpWebRequest 1
FTP Site 2
FTP Upload 12
Zero Upload Speed 6
Locating the ftp log file 3
connect to FTP server 15

Top