[thelist] media/image management

Steve Lewis nepolon at worlddomination.net
Mon Jun 30 16:01:25 CDT 2003


Chris W. Parker wrote:

>This is a good point. I think then at the very least I may just append something to the filename. Or maybe being in different directories will suffice... hmm... You've got me thinking.
>
>  
>
Your concern will probably be three-fold:
1) giving users meaningful filenames, making this modifiable after 
upload would probably be a good idea to allow folks to fix problematic 
filenames.
2) guaranteeing uniqueness on the server, expecially if you have a 
number of content providers sharing a common directory structure where 
they are likely to accidentally clobber each other's content by using 
overly generic filenames.
3) providing a download-friendly filename that is URL friendly as well.

In the past I have stored a "download-friendly" filename (usually just 
the filename the author/submitter supplied with URL character entities 
replaced: such as " " replaced by "_" etc), as well as a server-only 
filename (appending something, like you suggest) when I store the file 
in the filesystem (this server-only filename field is unnecessary if the 
file is in the DB).  This worked pretty well for me.

Steve



More information about the thelist mailing list