SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Sep 13, 2011, 06:07 #1
- Join Date
- Apr 2011
- Posts
- 10
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
How to dynamically create links to files that are being displayed from a directory?
I'm building an app with Classic ASP that allows users to upload files to a directory. After the file is uploaded it reads the directory and displays each of the uploaded files to the user.
That part I have working fine.
The question is, how do I create a dynamic link to each of those files after they are uploaded so others can download them?
Can anyone show me a simple example?
-
Sep 13, 2011, 07:25 #2
- Join Date
- Apr 2011
- Posts
- 10
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Here is my code:
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
Set AFolder = FSO.GetFolder(Server.MapPath("uploads"))
For Each Item in AFolder.Files
Response.Write "<font color=blue>" & Item.name & "</font>" & "<BR>"
Response.write " " & Item.DateLastModified & "<BR>" & "<BR>"
Next
-
Sep 14, 2011, 08:26 #3
- Join Date
- Apr 2011
- Posts
- 10
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
nevermind, I figured it out.
-
Sep 14, 2011, 17:25 #4
- Join Date
- Sep 2011
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Can you post your method of achieving your request? I think I would like to be able to have certain users upload files to a directory.
Thanks,
-
Sep 15, 2011, 09:40 #5
- Join Date
- Apr 2011
- Posts
- 10
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
This is the string I wrote to get the links to the files working.
Response.Write "<font color=blue class=para>" & "<a href=uploads/" & Item.name & ">" & Item.name & "</a>" & "</font>" & "<BR>"
Bookmarks