Welcome Guest, Not a member yet? Register   Sign In
Multiple file downloads using force_download()

I'm developing an application that allows users to download files. The user selects files from a pseudo catalog and they're place in a cue. When the users decide they've selected what they need they hit the download button to download all the selected files.

Everything up to the download operation works fine, but when the download function executes, only the first file in the cue is downloaded.

I'm using the force_download() function (from the download helper) in a loop in conjunction with an array that supplies filenames etc. The loop executes through the first iteration and then exits after the force_download() call.

Anyone have any ideas?

Thanks in advance

[eluser]Pascal Kriete[/eluser]
You can't send more than one file. The download helper calls exit() once it sends the file.
Imagine the mess a download with a lot of files would cause.

Is zipping them an option?

They could conceivably wind up being fairly large files .... most likely mpg2 and mpg3, but yes I could zip them, but I don't think I'd gain any compression to speak of.

I notice the exit in the helper source and thought it might part of the problem, but commenting it out doesn't seem to effect things one way or another.

I may have to rethink downloads a bit and discuss things with my client.

Thanks for the input,


Theme © iAndrew 2016 - Forum software by © MyBB