Search…

X3 Photo Gallery Support Forums

Search…
 
CrisC
Experienced
Topic Author
Posts: 59
Joined: 23 Oct 2018, 05:13

Download Galery Content as zip

24 Oct 2018, 19:33

Hi,
is there a way to provide a zip download which does contain all images within a galery?

My Idea was, that e.g. after a shooting - I will setup a password protected (hidden?) page with a galery of the images from that shooting.
This link will then be shared to the model - there, only the pictures could be downloaded by providing the download button for the single image - but it would also be nice to provide an option "download all images as zip".

Usually, I am only doing TFP shootings - so there is no need for implementing a buy option or some kind of checkout before.
Just a setting that will create a zip and start the download.

Thanks and with best regards,
Christoph
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Download Galery Content as zip

24 Oct 2018, 23:21

CrisC wrote:is there a way to provide a zip download which does contain all images within a gallery?
This has been requested earlier, and I have it in my list of things to do. There are some challenges with this feature, since your server would have to be able to ZIP 100s of images (or more) in real-time, each time and visitor clicks to download.

Anyway, there is a simple solution for now. Simply select all your images, and click "Zip":
Image

Then create a link in your "content" to download the ZIP:
Code
<a class="button" href="{{path}}images.zip">Download images</a>
If you add or delete images in a gallery, you would have to re-create the zip.
 
CrisC
Experienced
Topic Author
Posts: 59
Joined: 23 Oct 2018, 05:13

Re: Download Galery Content as zip

25 Oct 2018, 03:26

OK, thanks.
That's a workaround I could give a go :) :thumbsup:
 
CrisC
Experienced
Topic Author
Posts: 59
Joined: 23 Oct 2018, 05:13

Re: Download Galery Content as zip

25 Oct 2018, 03:56

Hi,
I have now tried this - but maybe I have done something wrong?

1. I have selected all images within a galery and then I selected "zipping"
2. The dialog does show, that I need to enter a file name WITHOUT an extension.
3. After the process was finished, I've checked the folders with my FTP client.
-> there was a new folder called "images" [which I have used for the file name] - but no zip package.

The Download Button does also link to a 404 error page.

[edit]
I've also found this tutorial - but I do not have the button "images" nor do I have the options within "galery" mentioned in this tutorial... ?!
viewtopic.php?f=61&t=9235
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Download Galery Content as zip

25 Oct 2018, 06:10

CrisC wrote:there was a new folder called "images" [which I have used for the file name] - but no zip package.
I can diagnose if you have link and login to your panel, but likely your server simply failed the process. The folder may be temporary.
CrisC wrote:The Download Button does also link to a 404 error page.
This doesn't matter much if the ZIP wasn't even created.
 
CrisC
Experienced
Topic Author
Posts: 59
Joined: 23 Oct 2018, 05:13

Re: Download Galery Content as zip

25 Oct 2018, 18:34

Hi I have now created the ZIP file on my local computer and uploaded it to the folder through the panel.
Clicking the "Download Button" does start the download, but also forward the user to a 404 error Page...

I have now changed the whole code to use a form and a button:
Code
<form method="get" action="{{path}}images.zip">
   <button class="btn">
     <i class="fa fa-download"></i> Download all images
   </button>
</form>
That seems to work absolutely fine :)