evanmiller / mod_zip

Streaming ZIP archiver for nginx 📦
https://www.nginx.com/resources/wiki/modules/zip/
BSD 3-Clause "New" or "Revised" License
216 stars 64 forks source link

Question about usage #80

Open macarthy opened 3 years ago

macarthy commented 3 years ago

HI,

I have a directories like :

-papers
-- paper1
---- paper1.pdf
---- image1.jpg
---- image2.jpg
-- paper2
---- paper2.pdf
---- image1.jpg
---- image2.jpg

Is it possible to have urls such as

papers/paper1.zip papers/paper2.zip

download the contents of the corresponding directory ? How would I config that ?

Thanks

donkeyDau commented 3 years ago

You need some logic in your server to take the request of paper1.zip, query the details of the folder content from s3 and pass the reply to mod_zip as described in https://github.com/evanmiller/mod_zip#Usage

Set up your nginx as proxy to pass the request to your logic and the reply is then taken by mod_zip. To set the name of the zip file see https://github.com/evanmiller/mod_zip#Tips