Skip to main content
Inspiring
July 8, 2008
Question

downloading from directory and db

  • July 8, 2008
  • 4 replies
  • 498 views
I can output results from the db fine and also their relevant docs as defined in the db from a directory with cfdirectory(onto an individual page with a table for the info and links to all the pdfs, word docs and images). How can I give the user the option to download it all without having to right click and save target-is there some magic way to bundle everything up? Thank-you
This topic has been closed for replies.

4 replies

Inspiring
July 8, 2008
thanks azadi
Inspiring
July 8, 2008
if you are on cf8 - there is cfzip and cfzipparam tags. check out the
tutorials on www.bennadel.com on how to use them

for cf7, iirc there was a custom tag cf_zip, or something like that -
you may want to check riaforge and cflib

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Inspiring
July 8, 2008
thanks for the answer Ian, yes it's an interesting question-I thought about cfcontent obviously, let's see if anyone has any experience on it-I'll google bundling things into a zip in the meantime!!
Inspiring
July 8, 2008
Hydrowizard wrote:
> I can output results from the db fine and also their relevant docs as defined
> in the db from a directory with cfdirectory(onto an individual page with a
> table for the info and links to all the pdfs, word docs and images). How can I
> give the user the option to download it all without having to right click and
> save target-is there some magic way to bundle everything up? Thank-you
>


For an individual file? Just create <a...> anchor links to each file.
Then clicking on the link will download or display the content in the
browser depending on file type, browser and installed plug-ins.

To download multiple files at once? I have never done this. You could
experiment with the <cfcontent...> tag and it's ability to deliver
non-text|html files to clients. But I do not see an easy and clean way
to use this to deliver multiple files with one user action.

The only real way I see to deliver multiple files with one user action
would be something that bundled up the files into a zip file and then
deliver that. I have never done this either but I have read articles
and blogs about the concept.

I just don't see it as much value over displaying a nice HTML table of
<a...> anchor tags that the user can easily click on each one desired to
receive.