I am currently in the middle of writing a CMS for a client, and have come across the need for a file upload solution. I could do the standard hackey $FILES handling and file writing to a directory, etc. but the process of thinking about it has left me wondering if there is an existing solution that can do more. I checked out [ZendFile](http://framework.zend.com/manual/en/zend.file.html) and it left me a little disappointed.
It's okay to write the files to disk at first, but when you scale out you need to put the files elsewhere - Amazon S3, a CDN, separate networked servers, etc. Is there any existing solution that can handle file uploads through the same interface and is able to support multiple backends (I realize this might mean having to store the uploaded file in a local "/tmp" directory first as an intermediate step)?