[thelist] ASP file upload problems
Wade Armstrong
wade_lists at runstrong.com
Fri Apr 19 13:27:01 CDT 2002
on 4/19/02 11:08 AM, Amy Johnson at ajohnson at purplemountain.net wrote:
> Hi. I am trying to set up a web site where the client can log in and upload
> web images to the server. I am using the
> ASPSimpleUpload component. My problem is security. First we tried putting
> the writeable directory in an area outside the web
> space. This worked great for uploading and deleting the files. BUT the web
> page could not access the images.
The HTML you write out indeed can't access the image. But ASP can, since it
runs under a different security context! Instead of <img
src="uploads/picture.jpg"> try <img src="image.asp?image=picture.jpg">. The
image.asp script then would open the image specified in the querystring, set
the correct content-type, and output the image (actually, a straight
Server.Transfer of the proper image might do the entire job in one line of
code).
Wade
More information about the thelist
mailing list