>> users uploading two identically named files at the same time (not all
>> /that/ unlikely), and you are using a database table to track
>
>Really? You don't think it's that uncommon? Please give an example as I
>can't think of any. Not like that's saying much. :)

I'd say that any time you have an application written for some specific
industry or audience, there's a good chance people will be uploading
assets with similar names -- we did one for an automotive company's design
department, and there were a lot of instances of people posting many
images named "headlights.jpg", for example. The application was visual,
the frontend was flash, and they were more interested in the image than
the filename.

I used microtime() to differentiate them, but in retrospect it should have
been a no-brainer to use the database primary id to help differentiate
these, since the DB already did all the heavy lifting involved in ensuring
uniqueness.

---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca            http://mike.teczno.com/contact.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to