This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Pages: 1 - Last Post: 23-Feb-2021 22:16 Last Post By: AndrewDD Threads: [ Previous | Next ]
AndrewDD

Posts: 11
Registered: 15-Jul-2014
Uploading "zip files for download" hidden, for publication later
Posted: 23-Feb-2021 20:01
 
  Click to reply to this thread Reply
Sorry - this is a bit complex to explain:

I have recently migrated from a much older jAlbum & Turtle. I have "offer download as zip for originals" checked.

My normal operation is to upload a project containing a months updates some time in advance, with the folders "hidden". Then when I want to publish them I rebuild it with the folders "not-hidden" - so the build & upload for publication only takes a few seconds. This is handy as I can do my monthly upload from home at a convenient time, and the publication at the right time, which may be when I am travelling and may not have a good internet connection. I publish parts of the project twice a week.

If you build a folder "hidden" it doesn't create the zip. With the old jAlbum/Turtle I had a workaround. I would build the project with the folders "not-hidden", which created the zip files. Then I would build it with them "hidden", which took a few seconds, hid the folders, but didn't touch the zips. I would upload, and then when it came time to do the publication, I would "un-hide" the appropriate folders, and a quick build & upload would do the job.

Unfortunately with the current jAlbum/Tiger this doesn't work. The first "not-hidden" build creates the zip. The "hidden" build doesn't touch it, and it gets uploaded. The problem is that rebuilding the folder "not-hidden" for publication re-creates the zip, and therefore due to the timestamp change, it uploads it again.

I can think of ugly workarounds, like making copies of the first zip file created for each folder, and after each build manually copying that back over the newly-recreated zip. This would be a pain and error prone as my monthly projects have around 20 folders.

Is anyone else doing this? Do you have a better workaround? Or is there a setting in jAlbum that I haven't spotted that will fix it?
JeffTucker

Posts: 7,375
Registered: 31-Jan-2006
Re: Uploading "zip files for download" hidden, for publication later
Posted: 23-Feb-2021 20:11   in response to: AndrewDD in response to: AndrewDD
 
  Click to reply to this thread Reply
Rather than wrestling with jAlbum to do that, I think I'd take a different tack. I take care of it on the server side.

So, on the server, I would have a directory that's not linked to from anywhere, called "holding." That's where I would let jAlbum do its uploads. Then, when it's time to publish, I'd call up the cPanel File Manager on my server (or whatever the equivalent is on your host), quickly delete the "live" album, and copy the entire "holding" contents to the live destination. Those kinds of things execute very quickly on the server side.

ETA: Delete then copy, rather than just copy, so that you don't end up with leftover files in the "live" site directory.
AndrewDD

Posts: 11
Registered: 15-Jul-2014
Re: Uploading "zip files for download" hidden, for publication later
Posted: 23-Feb-2021 21:35   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Thanks, that could be a possibility. The issue would be that I'm not publishing the entire project. Typically the project will have about 20 folders, and I publish 2 or 3 at a time. I'll see if I can work out something

edit>>>

OK. Checking on what happens when I "un-hide" a folder and rebuild, the only files that matter that change in the "album" directory are index.html, data1.json, deep-data.json & tree.json.

I can try building with each extra set of folders unhidden, starting from all hidden, ending with all visible. After each build I will put those files in a subdirectory "update-1", "update-2" etc. I can upload the whole lot at once. Then my publication process will be to move the next set of files from "update-xxx" to the album directory.

Not particularly friendly, but it will work :)

I'll leave the question not-answered for now, in case someone comes up with a better idea.

Edited by: AndrewDD on 23-Feb-2021 22:10

Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums