CyberSite.net Knowledge Base
How do I add impersonation for ASPUpload?


We provide an ASP component installed on all the web servers that allows uploading files using classic asp. This component is called Persits AspUpload. If you want to upload files without giving public write, you can impersonate with your ftp account. The following below is an example that will display 3 fields to browse and select files to upload using your ftp account. This is more secure as public now does not have write access to your specific folder where your files will be uploaded at.

Create a file called uploads.asp and save the following text below in it.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
<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>
- - - - - - - - - - - - - - - - - - - - - - - - - - -

Create another file called UploadScript1.asp and save the following text below in it.

Please note that domain is the data center your website is located at. It will either be SAT, DFW, or ORD.
- - - - - - - - - - - - - - - - - - - - - - - - - - -
<HTML>
<BODY>

<%

Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.LogonUser "domain", "ftpUserName", "ftpPassword"

Count = Upload.Save("\\location\where\I\want\my\files\uploaded\at")

%>
<% = Count %> files uploaded.

</BODY>
</HTML>
- - - - - - - - - - - - - - - - - - - - - - - - - - -

Now, just browse to your url www.mydomain.com/uploads.asp and you are ready to upload files.

For more information, please visit http://www.aspupload.com/ for more examples and the manual.



BACK TO KNOWLEDGE BASE TABLE OF CONTENT


*CyberSite.net takes no responsibility whatsoever for any files, code, content, database back-ups that are not made and/or are not made/done correctly. The information included on this knowledgebase page is usual and customary DB back-up procedures, but may not be complete. It is the client's responsibility to ensure that their site material is correctly backed-up. If a client prefers to make other arrangements or methods for backing up site material, it is at their sole discretion. CyberSite.net always recommends that client back-up their entire site on a regular schedule.

HOME | MARKETING | CREATIVE | DEVELOPMENT | MANAGEMENT | PORTFOLIO | PRODUCTS | HOSTING | CLIENT SERVICES | ABOUT CSN | SUPPORT | KNOWLEDGE | LEGAL & PRIVACY | SITE MAP

Copyright 2011 CyberSite.net, a subsidiary of Group One Communications, Inc., All rights reserved worldwide.
Please review our Terms, Conditions, Policies, Procedures, Terms of Use and Service.