How to upload files to a FTP Server?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to upload files to a FTP Server?

Nick Yao
I want to upload all files to my FTP Server, what i do now is: 1. Use the defautProvider upload files to the web server temp directory. 2. Use FTP Command to move temp files to the FTP Server But i don't think it is a good idea, when i upload a file (100M or above), i have to wait 30 seconds or more after the precessbar is stop. Is there any other better solution?
Reply | Threaded
Open this post in threaded view
|

Re: How to upload files to a FTP Server?

Dean Brettle
Administrator
You could try Creating a Custom UploadStorageProvider that streams the upload to the FTP server.  Alternatively, NeatUpload-1.3 is capable of Showing Processing Progress.

--Dean
Reply | Threaded
Open this post in threaded view
|

Re: How to upload files to a FTP Server?

Nick Yao
I know how to Create a Custom UploadStorageProvider that streams the upload to a remote server(use the Network Neighborhood),
but i don't know how to do this in a FTP Server, would u please give me some sample code or more detail advice. Thanks...
Reply | Threaded
Open this post in threaded view
|

Re: How to upload files to a FTP Server?

Dean Brettle
Administrator
I've never actually tried, but it looks like your provider's subclass of UploadedFile subclass would implement CreateStream() to return the Stream you get when calling GetRequestStream() on the FtpWebRequest you use to send the file to the FTP server.