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

apv apv at sedition.com
Sat Mar 11 19:07:24 CET 2006


On Friday, March 10, 2006, at 11:29  PM, A. Pagaltzis wrote:
> * apv <apv at sedition.com> [2006-03-11 07:55]:
>> I've been searching around and reading a bunch of code but I
>> can't find an "already complete" way to serve images (and other
>> media like flash, aacs, mp4s and such) from a database.
>>
>> Is there something obvious I've missed?
>
> Who knows? Your question isn’t very well posed. :-)
Rats. Take 2.

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).

I also know 2 so the question I mangled really should have been:

   Has anyone coded up a Static::Simple for DB data?

> 1. You shouldn’t put BLOBs in a database, particularly huge ones
>    like MP4s; database engines are not designed for such jobs,
>    filesystems are. Put the files somewhere you can get at them
>    and serve them statically.
>
> 2. You can’t do this while generating the HTML, it requires
>    another trip to the server. You want something alone the lines
>
>        <img src="[% c.uri_for('get_blob', blobname) %]">
>
> Regards,
> -- 
> Aristotle Pagaltzis // <http://plasmasturm.org/>
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst




More information about the Catalyst mailing list