perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Gormley < >
Subject Re: Where to store uploads
Date Tue, 03 Jul 2007 14:38:50 GMT
On Tue, 2007-07-03 at 10:26 -0400, Michael Peters wrote:
> Clinton Gormley wrote:
> > I can think of two approaches:
> >
> > 1) In the DB, store the name of the server to which your file has been
> >    uploaded
> Don't do that. The moment you put a file into the database you loose all
> of the nice tools that your OS gives you for working with files (grep, ls,
> find, etc).  Plus when you send those files to the client you have to
> query and stream it from the database instead of just using the
> filesystem.

I didn't realise that line was so confusing :)

I didn't mean: stick the file in the DB. 

I meant, stick the file into a directory on a particular machine, and
then put this into the DB:
Sorry - I meant, store this in the DB:
 - ID:          1234
 - type:        image/jpeg
 - path:        12/34/1234.jpg
 - server:  

So that your program would construct a URL pointing to the correct
server, or a translation layer would forward the request to the correct


View raw message