1 reply
dmittri...
First let me give you my understanding of your question:
You want visitors to your web site to be able to download images. When you refer to your local machine, I understand you to be referring to your client and not your [web] server. Your web site cannot connect to your local computer unless you are running some type of server service, i.e. FTP, HTTP. You could actually have code written on your [web] server and connect to your local computer to retrieve via FTP a file requested for download but I see this as problematic.
Web servers are, by design, to be running 24/7 if they are available to the public. There is no need to have them dynamically connect to a client computer to retrieve files.
If you want visitors to retrieve image files from your [web] server, you can just put them in [img] tags:
The above assumes the image is in the same directory as the .asp page displaying the image. Your visitor can right-click on the image and choose 'Save Picture As...' to retrieve the image.
If you wanted to list files you could create a directory on your [web] server and give the anonymous user [internet user] browsing rights to that directory only!! Then your files would be listed as they would in Windows Explorer. The visitor could click on the link to view the file in the browser and thus right-click to download the image or they could right click on the link and choose 'Save Target As...' to download the image without viewing.
Another option is to create the list yourself:
myimage.jpg
myimage2.jpg
Between the anchor [] tags, it should be more descriptive and is not required to be the file name:
A picture of me
A picture of my dog
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending