ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How to Use the Multiple Files Download option in a Webpage..

January 02, 2009 9:55am

Subscribe [3]
  • #1 / Jan 02, 2009 9:55am

    PBMK

    17 posts

    Hi Friends,


    I am using the PDF content to download the Files and read


    For Ex:

    Essays —Topic
    My Life Download as PDF
    Life is a Game Download as PDF
    First Love Download as PDF

    Download All Essays


    Like this how to i use the Multiple files Download option.
    For single entry i mention https://ellislab.com/asset/images/team-photo/my_life.pdf like that if i want to download all the content in the Essays what i have to use to Download ..


    Help me to solve this problem..


    Thanks in advance !!!

  • #2 / Jan 02, 2009 10:15am

    Ingmar

    29245 posts

    Sorry, not sure I understand. Do you want to allow download a bunch of files in one link?

  • #3 / Jan 02, 2009 10:16am

    PBMK

    17 posts

    Yes Mr.Ingmar That’s i need…I want to download multiple files in single click…

  • #4 / Jan 02, 2009 10:18am

    Mark Bowen

    12637 posts

    If you have lots of different files per topic / weblog entry and you want to download them all as one file then you are either going to need to zip them all up and save them in the same way as you do with all your other files by saving them in a custom field or otherwise you will need to look into finding a zip class and using some PHP to feed in all the PDF files and automatically create a zip file for you.

    If you have lots of space and the PDFs aren’t too big then I would go for a custom field personally but if you do need to do it on the fly then you will need to find a zip class online and program it into your template.

    Best wishes,

    Mark

  • #5 / Jan 02, 2009 10:25am

    PBMK

    17 posts

    Hi Mr.Mark,


    I am not clear What you are saying..

  • #6 / Jan 02, 2009 10:41am

    Mark Bowen

    12637 posts

    Well there is no built in way inside ExpressionEngine to achieve what you need so there are two ways of getting at what you need.

    1 - Create a ZIP file manually yourself with the various files in and upload this to a custom field just as you have been with each single PDF and then allow people to download this file.

    or

    2 - Use a ZIP class (PHP) which you will need to do some programming so that you can feed in the different file-names and locations to the script and that will then automatically create a ZIP file and allow the person to download the file.

    The latter method will definitely require custom coding so if you aren’t sure of how to do this and have plenty of disk space then the first method would definitely be the easiest in this matter.

    Best wishes,

    Mark

  • #7 / Jan 02, 2009 10:54am

    PBMK

    17 posts

    Hi Mr.Mark,


    Thank You For your Detailed answer…

  • #8 / Jan 02, 2009 11:03am

    Ingmar

    29245 posts

    As Mark pointed out, you’ll definitely need some custom code to accomplish what you are after. I’ll move this thread over to Howto to allow for some additional discussion, if so desired.

  • #9 / Jan 02, 2009 11:08am

    Mark Bowen

    12637 posts

    There is a zip.class.php file available from this site here, pretty sure you have to be logged in to the site in order to see it but as I already had an account there I can see the file. From what I remember registration is free though.

    This is definitely going to need some custom coding to achieve what you want if you do decide to go that route. I have used one of these PHP Zip classes before and from memory it wasn’t too difficult to get up and running although I never actually used it from within ExpressionEngine if the truth be told. I was just passing in file names inside a PHP file and got it to work in that way although I would think that if it works stand-alone then you should hopefully be able to get it to work from within ExpressionEngine also.

    There may be others on the forums here who have done this before though and hopefully they will pipe up with their answer to this too (you know who you are people! 😉 ).

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases