Welcome Guest, Not a member yet? Register   Sign In
Database Scaffolding and Photos question? Kinda lost....
#3

[eluser]jedd[/eluser]
Howdi. You've stumbled upon one of the many potential holy wars - images in or out of the database.

The distinction is this. For inside, the files are stored as BLOB (binary lump of data) within MySQL. These are effectively very very wide columns. For outside, the files are stored in your file system, and you store the path in the database.

From what you've described you want to keep your files outside of the database. So to answer your last question - it depends on whether you currently store them on your computer at all. If you do, then you probably don't want to duplicate that - so you should just refer to them wherever they are now. This may involve some permissions twiddling with your web server, but that's not a big problem.

If you want to keep them in your CI structure, then probably an 'assets/photos/' sub-directory (where assets is a peer to system). Be careful, though, as photo collections get huge fast.

If you're stuck on scaffolding, then you can still use that with this approach - you'll have a column called 'photopath' - say 256 characters long (not sure what OSX's or HFS's limits are). You can then type the path to your folder into that field.


Messages In This Thread
Database Scaffolding and Photos question? Kinda lost.... - by El Forum - 03-14-2009, 04:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB