Jump to content

[SOLVED] need to make directory downloadable


Looktrne

Recommended Posts

I have a directory of photos that I uploaded

 

I want to email someone a link that will automatically download the photos

 

for example http://mysite.com/photos/

 

say there is 20 photos in this folder is there a way to make all the contents of this folder download to the broswer?

 

not sure if php or html would be used for this...

 

any advise?

 

I want this to work without compressing the photos into one file.

 

thanks for any help

 

Paul

see the truth is each file needs to come down in one, The only

way is to zip the files, then let user download them via a zipped folder.............

 

SAYING THAT....

 

i dont no if it possable to force all files down with a while loop..............with the linked code i provded....

redarrow is right, you cannot download an entire directory. You will either need to zip them on the fly and force the download, or loop through and force the downloads individually. There is no way to download 20 files as 1 single download... at least not to my knowledge. It just don't make sense with the way files are handled on the web.

 

Take FTP for instance. You can select 100 files to download, but they don't come all in 1 stream. The ftp client builds a queue of all the files and then downloads them individually 1 stream at a time.

 

Me personally, if I hit a page that popped up 20+ save dialogs because a force download script was looped, I would be pissed and would probably cancel them and not go back again. I suggest zipping them on the fly and force the 1 zip file to download.

 

Nate

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.