[Catalyst] Serve blob files into src="" type tags

apv apv at sedition.com
Sat Mar 11 22:47:41 CET 2006


On Saturday, March 11, 2006, at 01:31  PM, A. Pagaltzis wrote:
> * apv <apv at sedition.com> [2006-03-11 19:15]:
>> For 1. I know the file system serves them better but there are
>> (as well you know) many reasons why a DB can be superior. And
>> I'm planning on writing them out to disk the same way I'm going
>> to write out the regular files to disk (talked about doing this
>> a couple months ago). They're going to be in the DB for
>> better/easier/integral management (modeling).
> As a suggestion, and just in case you hadn’t thought of this,
> what I do whenever I need to do something like that is put
> filenames (or paths) in a table column, instead of making it a
> BLOB. Or maybe I use the row ID as the filename, internally. Or
> something like that. In any case, the data lives in the
> filesystem (usually in a flat directory) and only the metadata is
> in the database.
I definitely considered it. The reason I'm moving away from it
is I want a "site" to be its database + its Catalyst app. Not the
database + 50 assorted CSS and JS files + several hundred or
even several thousands of images which may have been twiddled,
moved, and renamed manually without letting the database
know that the record it pointed to is now hopelessly "corrupt."

Deciding was sort of an agonizing process b/c file stuff is
*so* easy (especially with Perl) up front but I'm trying to think
long term. I'm not without doubts still but I *think* this is a
good design choice.

-Ashley



More information about the Catalyst mailing list