View Full Version : Problems with downloading multiple files
Amethyst
04-11-2005, 04:20 PM
Hi all,
I'm trying to find a way to download multiple files without having 10 pop up download windows appearing. Is there a way to have one pop up window and download the multiple files individually without zipping them?
If that is not possible, I would like to tar all the files the user selected without using the php function by using popen and execute the command "tar -cfv file.tar file1 file2 .." I tried to use the tar function but it seems to be giving me inconsistent behaviour. The pop up window does not always appear even though the tar file is in the directory. Any ideas or suggestions would be greatly appreciated! Thanks in advance. :)
Tangerine Dream
04-12-2005, 05:56 AM
I'm trying to find a way to download multiple files without having 10 pop up download windows appearing. Is there a way to have one pop up window and download the multiple files individually without zipping them?
Hi, no, using only one file (either tar or other archive format) containing e.g 10 files. Another way is to use client side applet (Java or ActiveX) which downloads 10 files without any pop ups
If that is not possible, I would like to tar all the files the user selected without using the php function by using popen and execute the command "tar -cfv file.tar file1 file2 .." I tried to use the tar function but it seems to be giving me inconsistent behaviour.
What's wrong with tar command? Why don't use shell gzip or CXLI. Zlib Compression Functions (http://www.php.net/manual/en/ref.zlib.php), or you also need to store file/directories permissions?
Amethyst
04-12-2005, 02:20 PM
Hi .. thanks for your help =) I guess I will just have to make an applet if I want to send multiple files. As for the second case, I think IE just have a different header than Firefox so it is not recognizing what to do with the tar command.
Larry770
04-12-2005, 03:15 PM
I might not be understanding you correctly, but how would the browser have any effect on the server side script? If the PHP is EXEC'ing the files into a .tar or .zip etc., then I'm not clear on why this method wouldnt work?
Amethyst
04-12-2005, 06:18 PM
I'm not exactly sure why either. It is very puzzling to me as well. It should not be browser dependent but when I execute the tar command in php, I return the pclose() exit status. On Firefox, there is no problem, it returns 0, but on IE, the same command, same file, it returns 126 if I select more than one file to download and 2 if one file is selected. I even tried it with a 'cp' command and again on IE, it doesn't return 0 but 126.
I haven't resolved the problem yet but I think I will switch over to downloading individual files without taring it since space is an issue. Now I am assume my only way is to use an applet to download these files into individual files, right? If so, does any one have any good samples or links as to how I can accomplish this? I've tried to search other forums and google but haven't had much luck.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.