Howto save mime info at mogilefs system
brad at danga.com
Sat Apr 1 08:41:00 UTC 2006
I write a file to /home/bradfitz/funny-picture.jpg, but there is
no mime info.
MIME exists at a layer above filesystems. (one could argue that OS
X has resource forks with mime info, but not really, 99% of the
time they're empty nowadays....) MogileFS, like other filesystems, just
stores bytes. If you want mime types or other magic, the caller of
MogileFS should provide it.
LiveJournal's userpics (10s of millions of them) have content types, but
it's the LJ app that knows about them. We tell Perlbal, "yo, service this
MogileFS file with this content-type...." and Perlbal does its internal
redirect thing, ignoring the (empty) mime type from the mogstored node.
You shouldn't expose your mogstoreds to the public anyway, so why do you
care about having a MIME type?
On Sat, 1 Apr 2006 wuhao at bokee.net wrote:
> If I save a image file like '1.gif' in mogilfs , it save as like
> /var/mogdate/dev10/0/000/000/0000000054.fid, there is no MIME info at all.
> Howto save mime info?
More information about the mogilefs