[thelist] media/image management

Steve Lewis nepolon at worlddomination.net
Mon Jun 30 15:16:11 CDT 2003


Chris W. Parker wrote:

>Steve Lewis <mailto:nepolon at worlddomination.net> wrote:
>
>  
>
>>It occurs to me that you might be better off storing the MIME type
>>instead.
>>Good idea. I'm on Linux so I think this can be achieved using the file command?
>>    
>>
Actually, it depends on the web scripting language you are using, and 
you would generally obtain this data at the time the file was uploaded 
to your server as the MIME type is included as part of the HTTP POST 
action from the web browser.

>>It is useful to store a filename for the item 
>>    
>>
This is what will be stored in the 'url' field. To be more specific the entire path will be stored in that field, not just the filename.

I didn't quite understand why you were storing a URL, based on your 
descriptions, but it looks like you wanted to completely discard the 
filename used by the author/submitter.  Fine, go with that.  Personally, 
I hate downloading from sites that rename all file downloads with some 
arbitary/meaningless combination of alpha and numeric characters.  You 
presumably have an idea for how you want to retrieve the item as well as 
how you will determine the server-side filename.  For folks who do store 
the media object in the database, and who didn't necessarily wish to 
generate a filename, I wanted to remind them that the file should 
probably have a meaningful filename saved in the system somewhere for 
future use.

>>You would generally do well under most DB management systems to store
>>the binary data in a separate table if you are storing them in the
>>database for performance reasons.
>>    
>>
>
>I'm a bit confused by this. I said I *didn't* want to store the files within the database but rather 
>  
>
Sorry for not qualifying my comments better.  The original poster wanted 
to store the files withing the database--which is a valid option, and 
aside from the comment about saving MIME types, my comments are not 
directed at you as much as noted in the thread for the benefits of 
thelist archives :)

Steve



More information about the thelist mailing list