tags:

views:

216

answers:

2

I've seen a number of different solutions for doing this but I wonder if anyone can suggest which is the most elegant and secure version of letting users upload their own files to a folder on their own shared hosting? (php.ini etc is out of bounds).

Files will be anything up to 100mb in size, so maybe an FTP based solution would be best?

A: 

For files that big, HTTP uploads are slow, may be blocked by your host, may be too big for your browser, etc. They are generally problematic. You could use FTP, or do what Github does on their repo "Downloads" page, and use Flash/Flex. This allows for better progress reporting and a cleaner interface. Here's an article on how to do a similar thing http://www.flash-db.com/Tutorials/upload/.
I realise that this is not PHP, but the only file uploads you can do in PHP are HTTP ones. (AFAIK)

Lucas Jones
Flash is fine in this case, so thanks for the link. I will try it out and post back my results.
jsims281
Works but still limited to the settings in PHP.
jsims281
+2  A: 

SWF Upload is a nice solution that provides a progress bar. You only need to allow a max file size of 100 mb in your php.ini file and tweak their examples to suit your needs. The users should have Flash Player installed, as php alone gives no way of getting the upload status. Other than that, there is no restriction on the server/client side.

rpSetzer