Hello, sorry if this question has been asked before, if so please direct me to it, i didn't see anything.
I have a page that I want to allow users to have the ability to upload files to a folder on our server.
I've tried using the simple ASPUpload as shown below:
Upload.html:
________________
<HTML>
<BODY BGCOLOR="#FFFFFF">
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="upload.asp">
<INPUT TYPE= FILE SIZE= 60 NAME="FILE1"> <BR>
<INPUT TYPE="SUBMIT" VALUE="Upload!">
</FORM>
</BODY>
</HTML>
________________
Upload.asp:
________________
<%
Set Upload = Server.CreateObject ("Persits.Upload.1")
Count = Upload.SaveVirtual ("/data/Example")
Set Upload = Nothing
response.redirect "EmpProfile.asp?file=1"
%>
<% = Count %> file(s) uploaded.
________________
This has worked and has saved the file to server. The issue I have now is that I want to be able to rename the file they are uploading, in order to append an ID number onto it. Then if they are looking at someone's page and there is a file with that person's ID number on it, it will show a link so they can download the file.
Does anyone have any tips of how to accomplish renaming the file, and then showing a link to it based on a substring of the file name?
Any help is appreciated!
I have a page that I want to allow users to have the ability to upload files to a folder on our server.
I've tried using the simple ASPUpload as shown below:
Upload.html:
________________
<HTML>
<BODY BGCOLOR="#FFFFFF">
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="upload.asp">
<INPUT TYPE= FILE SIZE= 60 NAME="FILE1"> <BR>
<INPUT TYPE="SUBMIT" VALUE="Upload!">
</FORM>
</BODY>
</HTML>
________________
Upload.asp:
________________
<%
Set Upload = Server.CreateObject ("Persits.Upload.1")
Count = Upload.SaveVirtual ("/data/Example")
Set Upload = Nothing
response.redirect "EmpProfile.asp?file=1"
%>
<% = Count %> file(s) uploaded.
________________
This has worked and has saved the file to server. The issue I have now is that I want to be able to rename the file they are uploading, in order to append an ID number onto it. Then if they are looking at someone's page and there is a file with that person's ID number on it, it will show a link so they can download the file.
Does anyone have any tips of how to accomplish renaming the file, and then showing a link to it based on a substring of the file name?
Any help is appreciated!