[thelist] media/image management

Marc Seyon seyon at delime.com
Mon Jun 30 17:02:31 CDT 2003

Message from Steve Lewis (6/30/2003 02:01 PM)
>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:
>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.

Assuming you need to be a registered user to upload files, append the 
user's ID to the filename.

myphoto.jpg becomes 0124myphoto.jpg

As for duplicate filenames from the same user, perhaps have the script look 
for a file of the same name within the directory, if it exists just stick a 
number onto the filename.

if already exists, mydocument.doc becomes mydocument1.doc

Just a couple random thoughts.


Carnival 2003 in all its photographic glory. Playyuhself.com

More information about the thelist mailing list