Instructions
PREREQUISITES:
Datatypes within your app:
File
|– file name
|– file (here the url needs to be stored of the file)
|– deletion-date (optional if you're soft deleting files)
(|+ optional fields, that don't interact with the Plugin)
Folder
|– folder name
|– folder subfolders (this should be a list of type Folder)
|– files (this should be a list of type File)
|– deletion-date (optional if you're soft deleting folders)
(|+ optional fields, that don't interact with the Plugin)
ZipStructure (optional -> to be created to read out creation status)
|– folderstructure (text)
|– statusCode (number)
|– success (yes/no)
|– logdata (text)
|– errorName (text)
|– errorMessage (text)
Gating users from downloading the wrong folders:
You can gate users from downloading nested objects (folders / files) by privacy restricting the access to the object with your own privacy rules. The program first loads all Folder Things, and File Things into memory that you pass in. If you run the Backend Workflow WITHOUT ignoring privacy rules and pass all Folders & Files, then only the folder & files where user has access are accessible for creation of the Zip
HOW TO:
0. you create an empty ZipStructure object
1. you make an action (in your Backend Workflows) of 'create folderstructure'. You fill in all Inputs according to the documentation. You save the outputs (minimum the folderstructure (text) into the previously created ZipStructure
2. you make an action in your fronted that triggers, as soon as the created ZipStructure has a value within the 'folderstructure' field. This action creates & downloads the Zip archive in the frontend.
3. (optionally): You add the zipDownloader element to your page where the download happens and display messages to the users what is currently happening based on the states it outputs. (e.g. at the start of the process: display a popup that tells user 'parsing folder', then after that 'creating zip', then hiding the popup as soon as the download starts)
Contact me on the forum post or DM in forum if you have any questions / issues arise.