ZF-4969: Why move_uploaded_file() in Zend_File_Transfer_Adapter_Http? Possible filename collisions.
Zend_File_Transfer_Adapter_Http defaults to storing file uploads in the system temp folder. And, if I'm not mistaken, it renames all incoming files to the filename provided (indirectly) from $_FILES['userfile']['name'], which is the "original" name of the file on the client machine (as provided by the browser).
Why is it doing file renaming at all (unless asked to do so by the a filter)? Isn't this introducing the potential for file naming collisions if two users simultaneously upload an identically named file?
In many use cases, an upload file is to be immediately processed (i.e. resize an image) and then moved to another server (i.e. on a content delivery network), so adding the extra overhead of running move_uploaded_file() seems unnecessary. Why rename the file at all by default, and why rename it to a filename that is not be guaranteed to be unique?