Can you upload multiple files at once to an FTP server?

I’m relatively new to the world of PHP and have just finished my first stable version of a web-based front end for an FTP server :smiley:

Does anybody know of a way in which I can allow the shift and control keys to allow multiple selections from file input boxes?

Any help, links or general comments will be most appreciated.

:)

yes you can use a FTP program, such as flashfxp, crystal ftp, smart ftp… etc…

theres alot out there… not sure which ones free… to lazy to check. google some free ones.

then all you do it login to your ftp site, select all the ones to be uploaded and the will upload :)

I believe that bensayers was looking for a PHP solution that would allow for multiple file uploads as opposed to requiring a third party software to do the same thing.

As a response to that I did a quick google search ( http://www.google.com/search?hl=en&q=mu … d+with+php ) and found several possibilities…

I looked at this one
http://the-stickman.com/web-development … e-element/

and it looked like it might be a good choice.

I was looking for some kind of applet or upload class that I can embed on my PHP page that will allow multiple selections of files to upload.

The stickman link (posted above) still requires you to click browse and each individual file, which will mean that anyone wishing to upload 100 files will have to click browse etc 100 times.

There must be a decent solution to this as I can’t believe that all the time that HTML, Java, Javascript, PHP, ASP etc have been around no-one has wanted to upload more than one file at a time :o

PLEASE SOMEONE MUST HAVE DONE THIS, SURELY?

Many thanks for reading this post I hope you can help. Ben Sayers.

Even applications like ws-ftp and the like still only upload one file at a time. They just queue up a list of the selected files.

I don’t quite understand the issue of browsing to the files and then having a single upload. The users will need to select the files regardless of what method you choose, correct? I can’t believe that you would want an intuitive enough program that would “Discover” what files to upload, therefore the user will need to select them.

I realize that the link provided above was not the “BEST” way to select the files (One at a time and then a single submit), but I believe it to be a better option than multiple “FILE” fields and multiple “BROWSE” buttons.

I did not look deep at that code, but I suspect you could use a method to “Browse” and “Select” an entire folder my modifying that code by making use of something like Javascript or perhaps a custom ActiveX control.

Also have you looked at ftp_put? http://php.net/ftp_put and the entire ftp library on php? http://us2.php.net/ftp This may help as well.

Everything I have read tells me that PHP does NOT allow for MULTIPLE file uploads (similar to an mput) . The best is doing a “Loop” of a list of files (as a single put multiple times).

As a final note and possible solution, have you considered just using I.E. and normal FTP? It is possible to use I.E. as an FTP Client. Just navigate to the appropriate website ftp://mydomain.com and (if required) you could/would enter your appropriate credentials. It’s then a matter of drag and drop (or copy and paste). I have tried this and it does work (With I.E. not Firefox).

This does leave the door open (so to speak) because FTP is generally not a very safe protocol, but if you have it opened for ftp anyway, this might be a simple® solution.

I found a way to do exactly what I wanted!!! :D

I used a flash object in my HTML code and then linked this up with my PHP FTP page. The flash file gets the files to upload (you can use SHIFT, CTRL and CTRL+A) the uploads them to the HTML server then the PHP takes over and moves them to the FTP Server.

I found this cool little utitlity at:
http://www.element-it.com/MultiPowUpload.aspx

Thanks for all your advice though. Ben Sayers.

Sponsor our Newsletter | Privacy Policy | Terms of Service