Re: Where to store uploads

2007-07-09 Thread Boysenberry Payne
I handle files with a db pointer. Works really good for me. I house all of the files on a "static" server and put pointers in the DB. Then I just update the DB with new pointers or remove pointers as needed. When looking up a file I request the DB file pointer then use that info to grab it from t

Re: Where to store uploads

2007-07-06 Thread Perrin Harkins
On 7/6/07, Frank Wiles <[EMAIL PROTECTED]> wrote: Another option for this is to use MogileFS (http://www.danga.com/mogilefs/) to store your files. You can control the redundancy at the app level and it just "figures" out where the file is when you request it. Keep in mind, you have to

Re: Where to store uploads

2007-07-06 Thread Frank Wiles
On Tue, 3 Jul 2007 10:26:55 -0400 "Perrin Harkins" <[EMAIL PROTECTED]> wrote: > > 2) Store your upload in a shared partition (eg on a SAN, NFS, > >iSCSI/OCFS2) > > That's ok if you need them on every server. Many applications just > upload a file and process it on one server, so they don't n

Re: Where to store uploads

2007-07-03 Thread Jonathan Vanasco
On Jul 3, 2007, at 10:38 AM, Clinton Gormley wrote: 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:1

Re: Where to store uploads

2007-07-03 Thread Clinton Gormley
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 t

Re: Where to store uploads

2007-07-03 Thread Clinton Gormley
On Tue, 2007-07-03 at 10:26 -0400, Perrin Harkins wrote: > On 7/3/07, Clinton Gormley <[EMAIL PROTECTED]> wrote: > > 1) In the DB, store the name of the server to which your file has been > >uploaded > > I try to avoid files in the DB. It always ends in tears. Sorry - I meant, store this in

Re: Where to store uploads

2007-07-03 Thread Michael Peters
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

Re: Where to store uploads

2007-07-03 Thread Perrin Harkins
On 7/3/07, Clinton Gormley <[EMAIL PROTECTED]> wrote: 1) In the DB, store the name of the server to which your file has been uploaded I try to avoid files in the DB. It always ends in tears. 2) Store your upload in a shared partition (eg on a SAN, NFS, iSCSI/OCFS2) That's ok if you n

Re: Where to store uploads

2007-07-03 Thread Foo JH
Depending on the number of files you're expecting, you may want to limit the number of files you put in a single folder. For example, in your shared folder you may want to create 26 subfolders - one for each letter of the alphabet. Then you drop the files in the subfolder matching the first let

Where to store uploads

2007-07-03 Thread Clinton Gormley
Following on from the thread "questions on serving big file & SQL statement parsing", I have a related question: Where do you store your uploads? I can think of two approaches: 1) In the DB, store the name of the server to which your file has been uploaded 2) Store your upload in a shared p