Hi Edd,
Please try the example below, it shows you how to add the timestamp into the file name.
Note: need to change the path "C:\inetpub\wwwroot\aspuploader\uploads\ " to yours.
- <%@ Language="VBScript" %>
- <!-- #include file="aspuploader/include_aspuploader.asp" -->
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>
- Form - Multiple files upload
- </title>
- <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:
- document.forms[0].submit();
- }
- </script>
- </head>
- <body>
- <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.MaxSizeKB=10240
- uploader.Name="myuploader"
- uploader.InsertText="Upload File (Max 10M)"
- uploader.MultipleFilesUpload=true
- %>
- <%=uploader.GetString() %>
- </form>
-
- <br/><br/>
- <%
-
- If Request.Form("myuploader")&""<>"" Then
-
- Dim list,i
-
-
- list=Split(Request.Form("myuploader"),"/")
-
- For i=0 to Ubound(list)
- if i>0 then
- Response.Write("<hr/>")
- end if
- Dim mvcfile
-
-
- Set mvcfile=uploader.GetUploadedFile(list(i))
-
- Response.Write("<div style='font-family:Fixedsys'>")
- Response.Write("Uploaded File:")
-
- Response.Write("<br/>FileName: ")
- Response.Write(mvcfile.FileName)
-
- Response.Write("<br/>FileSize: ")
- Response.Write(mvcfile.FileSize)
-
- Response.Write("<br/>FilePath: ")
- Response.Write(mvcfile.FilePath)
- Response.Write("</div>")
-
-
- mvcfile.MoveTo("C:\inetpub\wwwroot\aspuploader\uploads\" & Year(Date) & "-" & Month(Date()) & "-" & Day(Date()) & "-" & Hour(Time()) & "-" & Minute(Time())& "-" & mvcfile.FileName)
-
-
-
-
-
-
-
- Next
- End If
-
- %>
-
- </div>
- </body>
- </html>
Also what rights do we need to give to the uploaded temporary and final directories?
You need to have write/read permission of them.
Regards,
ken