Live Support, Chat, Upload Control and Rich Text Editor
Welcome to Support forums Sign in | Join | Help |Client Center
in Search

Upload to virtual directory?

Last post 06-28-2011, 10:41 AM by Eric. 1 replies.
Sort Posts: Previous Next
  •  06-27-2011, 2:05 PM 68177

    Upload to virtual directory?

    When I use a format like this for uploader.SaveDirectory...
 seems to be looking for a physical path. I would like to upload to a virtual path that's outside the actual web folder in IIS, but I can't seem to do that.
    Is there a way?
  •  06-28-2011, 10:41 AM 68204 in reply to 68177

    Re: Upload to virtual directory?

    Hi GenNS,
    Yes, this can be implemented.
    You can follow steps:
    1. Open IIS
    2. Navigate to the site which contains the ASP Uploader
    3. Create one virtual directory "savefoldervirdir" and let it point to the destination folder
    4. Save the following code to test.asp:
    <%@ Language="VBScript" %>
    <!-- #include file="aspuploader/include_aspuploader.asp" -->
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
    <html xmlns="">
      Form - Multiple files upload
     <link href="demo.css" rel="stylesheet" type="text/css" />
     <script type="text/javascript">
     function CuteWebUI_AjaxUploader_OnPostback() {
      //submit the form after the file have been uploaded:
     <div class="demo">                       
            <h2>Selecting multiple files for upload</h2>
      <p>ASP Uploader allows you to select multiple files and upload multiple files at once.</p>
       <!-- do not need enctype="multipart/form-data" -->
       <form id="form1" method="POST">
       Dim uploader
       Set uploader=new AspUploader
       uploader.InsertText="Upload File (Max 10M)"
       <%=uploader.GetString() %>

    If Request.Form("myuploader")&""<>"" Then

     Dim list,i
     'Gets the GUID List of the files based on uploader name

     For i=0 to Ubound(list)
      if i>0 then
      end if
      Dim mvcfile
      'get the uploaded file based on GUID
      Set mvcfile=uploader.GetUploadedFile(list(i))

      Response.Write("<div style='font-family:Fixedsys'>")
      Response.Write("Uploaded File:")
       'Gets the name of the file.
      Response.Write("<br/>FileName: ")
      'Gets the size of the file.
      Response.Write("<br/>FileSize: ")
      'Gets the temp file path.
      Response.Write("<br/>FilePath: ")
      'Copys the uploaded file to a new location.  
       'savefoldervirdir is the name of virtual directory which points to the outside path of your actual web folder
       'Moves the uploaded file to a new location.    
    End If
    5. Run test.asp and check whether files are uploaded to the destination folder.
    Thanks for asking
View as RSS news feed in XML
Powered by ASP.Net
Copyright 2003 - 2017 CuteSoft Components Inc.. All rights reserved.