In order to do this 2 pieces of information are required.
Once the information is available use the following 2 asp files as references to upload files. The USERNAME and PASSWORD in UploadScript1.asp are the same as those used for impersonation. (Refer to How do I add impersonation to my ASP.NET site?)
<HTML> <BODY BGCOLOR="#FFFFFF"> <FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="UploadScript1.asp"> <INPUT TYPE=FILE SIZE=60 NAME="FILE1"><BR> <INPUT TYPE=FILE SIZE=60 NAME="FILE2"><BR> <INPUT TYPE=FILE SIZE=60 NAME="FILE3"><BR> <INPUT TYPE=SUBMIT VALUE="Upload!"> </FORM> </BODY> </HTML>
<HTML>
<BODY>
<%
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.LogonUser "ord", "USERNAME", "PASSWORD"
Count = Upload.Save("\\fsvs02\target02\WindowsPathInFeaturesTab\upload")
%>
<% = Count %> files uploaded.
</BODY>
</HTML>
Please note that if your Cloud Site is located in the DFW datacenter the Upload.LogonUser line would need to be altered as follows:
Upload.LogonUser "dfw", "USERNAME", "PASSWORD"
Please also note that the credentials you use here must be those of the Primary FTP account. Secondary FTP accounts will NOT work!
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

0 Comments
Add new comment