Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Displaying Images ?

Reply
Thread Tools

Displaying Images ?

 
 
Vinay
Guest
Posts: n/a
 
      10-24-2003
Hi All:

I have a small application that stores images either in the database or as
files (depending on the user preference). I'm in the process of providing a
web interface to this application.

1. If the images are stored in the DB then, every an image is requested, it
will need to be pulled out and a temp file created and then displayed? What
is the best way to do this?

2. If the images are stored as files, how do I ensure security? For example
if I store all the images in a folder called \database\images and that has a
file 3.tif or 3.jpg, how do I ensure that people dont point their browsers
to http://mysite/database/images/3.jpg ?

Any pointers would be very helpful

TIA

Vinay
http://www.velocityreviews.com/forums/(E-Mail Removed)am


 
Reply With Quote
 
 
 
 
William Ryan
Guest
Posts: n/a
 
      10-24-2003
http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp

If you store them as Binary, then they'd have to query your database to hit
the images and extract data from the stream. I think the above article
should help you, but just check for BLOB and ADO.NEt on Google, there's tons
of examples

"Vinay" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All:
>
> I have a small application that stores images either in the database or as
> files (depending on the user preference). I'm in the process of providing

a
> web interface to this application.
>
> 1. If the images are stored in the DB then, every an image is requested,

it
> will need to be pulled out and a temp file created and then displayed?

What
> is the best way to do this?
>
> 2. If the images are stored as files, how do I ensure security? For

example
> if I store all the images in a folder called \database\images and that has

a
> file 3.tif or 3.jpg, how do I ensure that people dont point their browsers
> to http://mysite/database/images/3.jpg ?
>
> Any pointers would be very helpful
>
> TIA
>
> Vinay
> (E-Mail Removed)am
>
>



 
Reply With Quote
 
 
 
 
Vinay
Guest
Posts: n/a
 
      10-24-2003
Thanks for the lead.
However if I want to save the images as files, do you have any pointers on
how I can ensure that users will not be able to point their browsers to
http://mysite/imagestore/imagename and have the image come up on the
browser?

Vinay

"Vinay" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All:
>
> I have a small application that stores images either in the database or as
> files (depending on the user preference). I'm in the process of providing

a
> web interface to this application.
>
> 1. If the images are stored in the DB then, every an image is requested,

it
> will need to be pulled out and a temp file created and then displayed?

What
> is the best way to do this?
>
> 2. If the images are stored as files, how do I ensure security? For

example
> if I store all the images in a folder called \database\images and that has

a
> file 3.tif or 3.jpg, how do I ensure that people dont point their browsers
> to http://mysite/database/images/3.jpg ?
>
> Any pointers would be very helpful
>
> TIA
>
> Vinay
> (E-Mail Removed)am
>
>



 
Reply With Quote
 
vMike
Guest
Posts: n/a
 
      10-24-2003
You could have your src=yourpictureroutine.aspx and have your aspx file do

Response.ContentType = "image/jpeg"
mynewimage.Save(Response.OutputStream, ImageFormat.Jpeg)

Where mynewimage is a system.drawing.image from file. You could mask the
file name or put the pictures in a non-www directory and do something like
mynewimage=mgGetThumbNail(...)

Function mgGetThumbNail(strFile as string, intWidth as integer, intHeight as
integer) as system.drawing.image
Dim myBitmap As bitmap = New Bitmap(strFile)
return mybitmap.getthumbnailimage(intWidth,intHeight,noth ing,nothing)
End Function

Someone can still right click the picture and save the thumbnail. But they
won't be able to get the actual image file. If you want to keep a higher
quality but smaller size you can use something like this.

Function mgAdjustBitmap(strFile as string, intHorz as integer, intVert as
integer) as bitmap
Dim mysize as size = new size(inthorz,intVert)
Dim myBitmap As bitmap = New Bitmap(strFile)
myBitmap = new bitmap(mybitmap,mysize)
return myBitmap 'myImg
End Function


Finally, once you have the image you can add text to the graphic using
something like this (snip)

dim objGraphic as Graphics = Graphics.FromImage(objBitmap)
objGraphic.DrawString(strText,New Font("Tahoma",intFontSize),New
SolidBrush(sysColor),intHorzPos, intVertPos)
return objBitMap

Hope this helps.
I have heard that some people put clear transparent images over the page
images so someone can't right click it but that seems to be a bit extreme.

Hope this helps in some way.

"Vinay" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All:
>
> I have a small application that stores images either in the database or as
> files (depending on the user preference). I'm in the process of providing

a
> web interface to this application.
>
> 1. If the images are stored in the DB then, every an image is requested,

it
> will need to be pulled out and a temp file created and then displayed?

What
> is the best way to do this?
>
> 2. If the images are stored as files, how do I ensure security? For

example
> if I store all the images in a folder called \database\images and that has

a
> file 3.tif or 3.jpg, how do I ensure that people dont point their browsers
> to http://mysite/database/images/3.jpg ?
>
> Any pointers would be very helpful
>
> TIA
>
> Vinay
> (E-Mail Removed)am
>
>



 
Reply With Quote
 
Vinay
Guest
Posts: n/a
 
      10-24-2003
Thanks for the pointers Mike.
At the risk of sounding daft...what do you mean by?

> You could have your src=yourpictureroutine.aspx and have your aspx file do


Here's what I am trying to do:
I have an aspx page that has a list box, that has lets say 3 entries. When
the user clicks on each entry I want to show the corresponding image. These
images could be big tif files or jpg files. I want to show these images in a
new window. I've not worked a great deal with this before..hence the
confusion on my part.

Thanks!

Vinay



> Response.ContentType = "image/jpeg"
> mynewimage.Save(Response.OutputStream, ImageFormat.Jpeg)
>
> Where mynewimage is a system.drawing.image from file. You could mask the
> file name or put the pictures in a non-www directory and do something like
> mynewimage=mgGetThumbNail(...)
>
> Function mgGetThumbNail(strFile as string, intWidth as integer, intHeight

as
> integer) as system.drawing.image
> Dim myBitmap As bitmap = New Bitmap(strFile)
> return mybitmap.getthumbnailimage(intWidth,intHeight,noth ing,nothing)
> End Function
>
> Someone can still right click the picture and save the thumbnail. But

they
> won't be able to get the actual image file. If you want to keep a higher
> quality but smaller size you can use something like this.
>
> Function mgAdjustBitmap(strFile as string, intHorz as integer, intVert as
> integer) as bitmap
> Dim mysize as size = new size(inthorz,intVert)
> Dim myBitmap As bitmap = New Bitmap(strFile)
> myBitmap = new bitmap(mybitmap,mysize)
> return myBitmap 'myImg
> End Function
>
>
> Finally, once you have the image you can add text to the graphic using
> something like this (snip)
>
> dim objGraphic as Graphics = Graphics.FromImage(objBitmap)
> objGraphic.DrawString(strText,New Font("Tahoma",intFontSize),New
> SolidBrush(sysColor),intHorzPos, intVertPos)
> return objBitMap
>
> Hope this helps.
> I have heard that some people put clear transparent images over the page
> images so someone can't right click it but that seems to be a bit extreme.
>
> Hope this helps in some way.
>
> "Vinay" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi All:
> >
> > I have a small application that stores images either in the database or

as
> > files (depending on the user preference). I'm in the process of

providing
> a
> > web interface to this application.
> >
> > 1. If the images are stored in the DB then, every an image is requested,

> it
> > will need to be pulled out and a temp file created and then displayed?

> What
> > is the best way to do this?
> >
> > 2. If the images are stored as files, how do I ensure security? For

> example
> > if I store all the images in a folder called \database\images and that

has
> a
> > file 3.tif or 3.jpg, how do I ensure that people dont point their

browsers
> > to http://mysite/database/images/3.jpg ?
> >
> > Any pointers would be very helpful
> >
> > TIA
> >
> > Vinay
> > (E-Mail Removed)am
> >
> >

>
>



 
Reply With Quote
 
vMike
Guest
Posts: n/a
 
      10-24-2003
I thought you where referring to images on the page. If you want images in a
new window you probably want to do a response.redirect in the onclick event
of the listbox. In that case you would not use the src= . That would only be
used for images on the page. If you're openning a new window then your image
is probably larger and higher quality. In that case, someone can just right
click it and save it to their disk. I don't think there is much you can do
about that. If you have a really high quality picture you can downgrade it
using an aspx file that calls up the image and then makes it a thumbnail or
smaller image using the info in my last post. You can also you a mask in
your code so that the user does not know the actual file name of the image
so they can't go back and try to get the base image. Hope this helps. There
was a site that had some other ideas, I will try to find it and post a link
when I get the chance.
Here is some code I use for some of my pictures. This codes does not mask
the file name but you could easily add it. Also if some of you file are tiff
then you would need to build that into the content type. I snipped this so
hopefully I got all the pieces.

sub Page_Load(sender as object, e as eventArgs)

dim strPic as string = request.querystring("_p")
dim strDesigner as string = request.querystring("_d") & ""
dim intWidth as int32 = ctype(request.querystring("_w"),int32)
dim intHeight as int32 = ctype(request.querystring("_h"),int32)
dim intQuality as int32 = ctype(request.querystring("_q"),int32)
dim myNewImage as system.drawing.image
dim intCacheTime as int32 = ctype(request.querystring("_c"),int32)
if intCacheTime > 3600 then intCacheTime = 3600

dim strFileLoc as string =
server.mappath(configurationSettings.AppSettings(" picroot"))
Response.ContentType = "image/jpeg"
if intCacheTime > 0 then
Response.Cache.SetExpires(DateTime.Now.AddSeconds( intCacheTime))
Response.Cache.SetCacheability(HttpCacheability.Pu blic)
Response.Cache.SetValidUntilExpires(True)
Response.Cache.VaryByParams("_p") = True
Response.Cache.VaryByParams("_h") = True
Response.Cache.VaryByParams("_c") = True
end if


try
select case intQuality
case is = 1
Dim bFlag as boolean = false
if intWidth = 0 then intWidth = 200
if intHeight = 0 then intHeight = 200
if strDesigner.length > 0 then bFlag = true
mynewimage = mgAdjustBitmap(strFileLoc & strPic, intWidth,
intHeight,bFlag,strDesigner)
case is = 2
if intWidth = 0 then intWidth = 90
if intHeight = 0 then intHeight = 90
mynewimage = mggetthumbnail(strFileLoc & strPic,intWidth,intHeight)
case is = 3
if intWidth = 0 then intWidth = 90
if intHeight = 0 then intHeight = 90
mynewimage = mggetthumbnail(strFileLoc & strPic,intWidth,intHeight)
dim strSaveLoc as string =
server.mappath(configurationSettings.AppSettings(" thumbroot"))
mynewimage.save(strSaveLoc & strpic,ImageFormat.Jpeg)
case is = 4
if intWidth = 0 then intWidth = 90
if intHeight = 0 then intHeight = 90
mynewimage = mggetthumbnail(strFileLoc & strPic,intWidth,intHeight)
dim strSaveLoc as string =
server.mappath(configurationSettings.AppSettings(" thumbroot"))
mynewimage.save(strSaveLoc & strpic,ImageFormat.Jpeg)
case else
if intWidth = 0 then intWidth = 90
if intHeight = 0 then intHeight = 90
mynewimage = mggetthumbnail(strFileLoc & strPic,intWidth,intHeight)

end select
mynewimage.Save(Response.OutputStream, ImageFormat.Jpeg)
mynewimage.dispose
catch
mynewimage= mggetthumbnail(strFileLoc & "npicture.jpg",240,180)

mynewimage.Save(Response.OutputStream, ImageFormat.Jpeg)
mynewimage.dispose
end try
End Sub

Function mgGetThumbNail(strFile as string, intWidth as integer, intHeight as
integer) as system.drawing.image
Dim myBitmap As bitmap = New Bitmap(strFile)
return mybitmap.getthumbnailimage(intWidth,intHeight,noth ing,nothing)
End Function

Function mgAdjustBitmap(strFile as string, intHorz as integer, intVert as
integer,bDrawTextFlag as boolean, strText as string) as bitmap

Dim mysize as size = new size(inthorz,intVert)
Dim myBitmap As bitmap = New Bitmap(strFile)
myBitmap = new bitmap(mybitmap,mysize)
if bDrawTextFlag then
myBitmap = mgDrawText(myBitmap, strText, 8,
color.blue,ctype(intHorz*.05,int32),ctype(intVert * .92,int32))
end if


return myBitmap
End Function

Function mgDrawText(objBitmap as bitmap, strText as string, intFontSize as
int32, sysColor as color, intHorzPos as int32, intVertPos as int32) as
bitmap
dim objGraphic as Graphics = Graphics.FromImage(objBitmap)
objGraphic.DrawString(strText,New Font("Tahoma",intFontSize),New
SolidBrush(sysColor),intHorzPos, intVertPos)
return objBitMap
End Function



"Vinay" <(E-Mail Removed)> wrote in message
news:%23DVdo%(E-Mail Removed)...
> Thanks for the pointers Mike.
> At the risk of sounding daft...what do you mean by?
>
> > You could have your src=yourpictureroutine.aspx and have your aspx file

do
>
> Here's what I am trying to do:
> I have an aspx page that has a list box, that has lets say 3 entries. When
> the user clicks on each entry I want to show the corresponding image.

These
> images could be big tif files or jpg files. I want to show these images in

a
> new window. I've not worked a great deal with this before..hence the
> confusion on my part.
>
> Thanks!
>
> Vinay
>
>
>
> > Response.ContentType = "image/jpeg"
> > mynewimage.Save(Response.OutputStream, ImageFormat.Jpeg)
> >
> > Where mynewimage is a system.drawing.image from file. You could mask the
> > file name or put the pictures in a non-www directory and do something

like
> > mynewimage=mgGetThumbNail(...)
> >
> > Function mgGetThumbNail(strFile as string, intWidth as integer,

intHeight
> as
> > integer) as system.drawing.image
> > Dim myBitmap As bitmap = New Bitmap(strFile)
> > return mybitmap.getthumbnailimage(intWidth,intHeight,noth ing,nothing)
> > End Function
> >
> > Someone can still right click the picture and save the thumbnail. But

> they
> > won't be able to get the actual image file. If you want to keep a higher
> > quality but smaller size you can use something like this.
> >
> > Function mgAdjustBitmap(strFile as string, intHorz as integer, intVert

as
> > integer) as bitmap
> > Dim mysize as size = new size(inthorz,intVert)
> > Dim myBitmap As bitmap = New Bitmap(strFile)
> > myBitmap = new bitmap(mybitmap,mysize)
> > return myBitmap 'myImg
> > End Function
> >
> >
> > Finally, once you have the image you can add text to the graphic using
> > something like this (snip)
> >
> > dim objGraphic as Graphics = Graphics.FromImage(objBitmap)
> > objGraphic.DrawString(strText,New Font("Tahoma",intFontSize),New
> > SolidBrush(sysColor),intHorzPos, intVertPos)
> > return objBitMap
> >
> > Hope this helps.
> > I have heard that some people put clear transparent images over the page
> > images so someone can't right click it but that seems to be a bit

extreme.
> >
> > Hope this helps in some way.
> >
> > "Vinay" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Hi All:
> > >
> > > I have a small application that stores images either in the database

or
> as
> > > files (depending on the user preference). I'm in the process of

> providing
> > a
> > > web interface to this application.
> > >
> > > 1. If the images are stored in the DB then, every an image is

requested,
> > it
> > > will need to be pulled out and a temp file created and then displayed?

> > What
> > > is the best way to do this?
> > >
> > > 2. If the images are stored as files, how do I ensure security? For

> > example
> > > if I store all the images in a folder called \database\images and that

> has
> > a
> > > file 3.tif or 3.jpg, how do I ensure that people dont point their

> browsers
> > > to http://mysite/database/images/3.jpg ?
> > >
> > > Any pointers would be very helpful
> > >
> > > TIA
> > >
> > > Vinay
> > > (E-Mail Removed)am
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Vinay
Guest
Posts: n/a
 
      10-24-2003
Mike:

Thanks - the code will certainly help me understand how I can go about
trying to do what I need to do. Appreciate you taking the time to help

Vinay

"vMike" <(E-Mail Removed)> wrote in message
news:bnc34h$sis$(E-Mail Removed)...
> I thought you where referring to images on the page. If you want images in

a
> new window you probably want to do a response.redirect in the onclick

event
> of the listbox. In that case you would not use the src= . That would only

be
> used for images on the page. If you're openning a new window then your

image
> is probably larger and higher quality. In that case, someone can just

right
> click it and save it to their disk. I don't think there is much you can do
> about that. If you have a really high quality picture you can downgrade it
> using an aspx file that calls up the image and then makes it a thumbnail

or
> smaller image using the info in my last post. You can also you a mask in
> your code so that the user does not know the actual file name of the image
> so they can't go back and try to get the base image. Hope this helps.

There
> was a site that had some other ideas, I will try to find it and post a

link
> when I get the chance.
> Here is some code I use for some of my pictures. This codes does not mask
> the file name but you could easily add it. Also if some of you file are

tiff
> then you would need to build that into the content type. I snipped this so
> hopefully I got all the pieces.
>
> sub Page_Load(sender as object, e as eventArgs)
>
> dim strPic as string = request.querystring("_p")
> dim strDesigner as string = request.querystring("_d") & ""
> dim intWidth as int32 = ctype(request.querystring("_w"),int32)
> dim intHeight as int32 = ctype(request.querystring("_h"),int32)
> dim intQuality as int32 = ctype(request.querystring("_q"),int32)
> dim myNewImage as system.drawing.image
> dim intCacheTime as int32 = ctype(request.querystring("_c"),int32)
> if intCacheTime > 3600 then intCacheTime = 3600
>
> dim strFileLoc as string =
> server.mappath(configurationSettings.AppSettings(" picroot"))
> Response.ContentType = "image/jpeg"
> if intCacheTime > 0 then
> Response.Cache.SetExpires(DateTime.Now.AddSeconds( intCacheTime))
> Response.Cache.SetCacheability(HttpCacheability.Pu blic)
> Response.Cache.SetValidUntilExpires(True)
> Response.Cache.VaryByParams("_p") = True
> Response.Cache.VaryByParams("_h") = True
> Response.Cache.VaryByParams("_c") = True
> end if
>
>
> try
> select case intQuality
> case is = 1
> Dim bFlag as boolean = false
> if intWidth = 0 then intWidth = 200
> if intHeight = 0 then intHeight = 200
> if strDesigner.length > 0 then bFlag = true
> mynewimage = mgAdjustBitmap(strFileLoc & strPic, intWidth,
> intHeight,bFlag,strDesigner)
> case is = 2
> if intWidth = 0 then intWidth = 90
> if intHeight = 0 then intHeight = 90
> mynewimage = mggetthumbnail(strFileLoc & strPic,intWidth,intHeight)
> case is = 3
> if intWidth = 0 then intWidth = 90
> if intHeight = 0 then intHeight = 90
> mynewimage = mggetthumbnail(strFileLoc & strPic,intWidth,intHeight)
> dim strSaveLoc as string =
> server.mappath(configurationSettings.AppSettings(" thumbroot"))
> mynewimage.save(strSaveLoc & strpic,ImageFormat.Jpeg)
> case is = 4
> if intWidth = 0 then intWidth = 90
> if intHeight = 0 then intHeight = 90
> mynewimage = mggetthumbnail(strFileLoc & strPic,intWidth,intHeight)
> dim strSaveLoc as string =
> server.mappath(configurationSettings.AppSettings(" thumbroot"))
> mynewimage.save(strSaveLoc & strpic,ImageFormat.Jpeg)
> case else
> if intWidth = 0 then intWidth = 90
> if intHeight = 0 then intHeight = 90
> mynewimage = mggetthumbnail(strFileLoc & strPic,intWidth,intHeight)
>
> end select
> mynewimage.Save(Response.OutputStream, ImageFormat.Jpeg)
> mynewimage.dispose
> catch
> mynewimage= mggetthumbnail(strFileLoc & "npicture.jpg",240,180)
>
> mynewimage.Save(Response.OutputStream, ImageFormat.Jpeg)
> mynewimage.dispose
> end try
> End Sub
>
> Function mgGetThumbNail(strFile as string, intWidth as integer, intHeight

as
> integer) as system.drawing.image
> Dim myBitmap As bitmap = New Bitmap(strFile)
> return mybitmap.getthumbnailimage(intWidth,intHeight,noth ing,nothing)
> End Function
>
> Function mgAdjustBitmap(strFile as string, intHorz as integer, intVert as
> integer,bDrawTextFlag as boolean, strText as string) as bitmap
>
> Dim mysize as size = new size(inthorz,intVert)
> Dim myBitmap As bitmap = New Bitmap(strFile)
> myBitmap = new bitmap(mybitmap,mysize)
> if bDrawTextFlag then
> myBitmap = mgDrawText(myBitmap, strText, 8,
> color.blue,ctype(intHorz*.05,int32),ctype(intVert * .92,int32))
> end if
>
>
> return myBitmap
> End Function
>
> Function mgDrawText(objBitmap as bitmap, strText as string, intFontSize as
> int32, sysColor as color, intHorzPos as int32, intVertPos as int32) as
> bitmap
> dim objGraphic as Graphics = Graphics.FromImage(objBitmap)
> objGraphic.DrawString(strText,New Font("Tahoma",intFontSize),New
> SolidBrush(sysColor),intHorzPos, intVertPos)
> return objBitMap
> End Function
>
>
>
> "Vinay" <(E-Mail Removed)> wrote in message
> news:%23DVdo%(E-Mail Removed)...
> > Thanks for the pointers Mike.
> > At the risk of sounding daft...what do you mean by?
> >
> > > You could have your src=yourpictureroutine.aspx and have your aspx

file
> do
> >
> > Here's what I am trying to do:
> > I have an aspx page that has a list box, that has lets say 3 entries.

When
> > the user clicks on each entry I want to show the corresponding image.

> These
> > images could be big tif files or jpg files. I want to show these images

in
> a
> > new window. I've not worked a great deal with this before..hence the
> > confusion on my part.
> >
> > Thanks!
> >
> > Vinay
> >
> >
> >
> > > Response.ContentType = "image/jpeg"
> > > mynewimage.Save(Response.OutputStream, ImageFormat.Jpeg)
> > >
> > > Where mynewimage is a system.drawing.image from file. You could mask

the
> > > file name or put the pictures in a non-www directory and do something

> like
> > > mynewimage=mgGetThumbNail(...)
> > >
> > > Function mgGetThumbNail(strFile as string, intWidth as integer,

> intHeight
> > as
> > > integer) as system.drawing.image
> > > Dim myBitmap As bitmap = New Bitmap(strFile)
> > > return mybitmap.getthumbnailimage(intWidth,intHeight,noth ing,nothing)
> > > End Function
> > >
> > > Someone can still right click the picture and save the thumbnail. But

> > they
> > > won't be able to get the actual image file. If you want to keep a

higher
> > > quality but smaller size you can use something like this.
> > >
> > > Function mgAdjustBitmap(strFile as string, intHorz as integer, intVert

> as
> > > integer) as bitmap
> > > Dim mysize as size = new size(inthorz,intVert)
> > > Dim myBitmap As bitmap = New Bitmap(strFile)
> > > myBitmap = new bitmap(mybitmap,mysize)
> > > return myBitmap 'myImg
> > > End Function
> > >
> > >
> > > Finally, once you have the image you can add text to the graphic using
> > > something like this (snip)
> > >
> > > dim objGraphic as Graphics = Graphics.FromImage(objBitmap)
> > > objGraphic.DrawString(strText,New Font("Tahoma",intFontSize),New
> > > SolidBrush(sysColor),intHorzPos, intVertPos)
> > > return objBitMap
> > >
> > > Hope this helps.
> > > I have heard that some people put clear transparent images over the

page
> > > images so someone can't right click it but that seems to be a bit

> extreme.
> > >
> > > Hope this helps in some way.
> > >
> > > "Vinay" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > Hi All:
> > > >
> > > > I have a small application that stores images either in the database

> or
> > as
> > > > files (depending on the user preference). I'm in the process of

> > providing
> > > a
> > > > web interface to this application.
> > > >
> > > > 1. If the images are stored in the DB then, every an image is

> requested,
> > > it
> > > > will need to be pulled out and a temp file created and then

displayed?
> > > What
> > > > is the best way to do this?
> > > >
> > > > 2. If the images are stored as files, how do I ensure security? For
> > > example
> > > > if I store all the images in a folder called \database\images and

that
> > has
> > > a
> > > > file 3.tif or 3.jpg, how do I ensure that people dont point their

> > browsers
> > > > to http://mysite/database/images/3.jpg ?
> > > >
> > > > Any pointers would be very helpful
> > > >
> > > > TIA
> > > >
> > > > Vinay
> > > > (E-Mail Removed)am
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
vMike
Guest
Posts: n/a
 
      10-25-2003
Here a link to a site that has some other idea.

http://www.htmlite.com/faq010.php

"Vinay" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All:
>
> I have a small application that stores images either in the database or as
> files (depending on the user preference). I'm in the process of providing

a
> web interface to this application.
>
> 1. If the images are stored in the DB then, every an image is requested,

it
> will need to be pulled out and a temp file created and then displayed?

What
> is the best way to do this?
>
> 2. If the images are stored as files, how do I ensure security? For

example
> if I store all the images in a folder called \database\images and that has

a
> file 3.tif or 3.jpg, how do I ensure that people dont point their browsers
> to http://mysite/database/images/3.jpg ?
>
> Any pointers would be very helpful
>
> TIA
>
> Vinay
> (E-Mail Removed)am
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with displaying dynamic images in browser using ASP.NET. Ken Varn ASP .Net 2 05-11-2004 05:44 PM
Displaying images from a database in an image control =?Utf-8?B?SmltIE1hY2U=?= ASP .Net 2 05-05-2004 04:26 AM
Displaying images from a MySQL Database Matt ASP .Net 0 08-01-2003 10:25 AM
Re: Displaying images Hellmark Firefox 0 06-27-2003 08:06 AM
Re: displaying several images from a sqldatabase. David J. Berman ASP .Net 0 06-24-2003 02:18 PM



Advertisments