Hi antony,
    IF you put the image files in the directory structure that contains your
webapp, you might hit a security situation where a clever user can directly
access these directories with a normal http request to the file.

    It would not be very difficult to guess your image directory structure
if it is in the same directory space.

    As already suggested you should keep these files in some location, keep
a link to those file locations in the database and have a script like
(download.jsp?fileID=<someimageid>)

    This script should return the the content-type as image/gif or
image/jpeg as the case might be and return the image contents.

    There could be related security issues.

    Hope this helps.

sarath
PS: This is in the context of your comment saying that users can upload
images and store them on your server. If the images are simple site images,
you might as well put them in your web apps directory.

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 17, 2001 12:06 PM
Subject: Re: Where should I store image files?


> Where is a good place to put this directory. Should I put it in the
> directory structure which contains my webapp, ie, using tomcat,
>
> /var/tomcat4/webapps/mywebapp/images
>
> would this be ok?  Or is there somewhere else which is better?
>
> Cheers
>
> Tony
>
>
>
>
>
> Phase Communcations wrote:
>
> > I would suggest a directory. Databases can handle the binary info. But,
it
> > is not good for performance. Both will work but I would place a file
> > path/url in the database to reference the images and store them in a
> > directory.
> >
> > Brandon Goodin
> > Phase Web and Multimedia
> > P (406) 862-2245
> > F (406) 862-0354
> > [EMAIL PROTECTED]
> > http://www.phase.ws
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, December 16, 2001 9:24 PM
> > To: Struts Users Mailing List
> > Subject: Where should I store image files?
> >
> >
> > Hi Folks
> >
> > I have a jsp/servlet web app and am not sure where I should keep the
> > image files.  The image files are constantly getting added to, ie people
> > can upload new images and they should be stored somewhere, either in a
> > database or in a directory somewhere.  I am not sure which is the best
> > way to go.  Can someone please tell me where they think I should store
> > the images.
> >
> > Cheers
> >
> > Tony
> >
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to