Asynchronous download jobs

Infradox 31.2 lets staff members and website users post download jobs.

Introduction

Asynchronous download jobs are processed in the background on the server without users having to wait for such jobs to complete. One or more ZIP files are created and when the process has completed the poster will receive an e-mail with download links. Asynchronous download jobs can be posted for 300 or less files. You can of course post multiple jobs.
Administrators/Staff members can view the status of all jobs, and they can also cancel jobs.

Download jobs for end users

This function can be made available to website users so that they can request larger download orders, while being able to continue other tasks while their request is being processed.

To enable this function, go to Site configuration, Orders and download page and open the Download page settings. Find the setting Asynchronous ZIP files and select one of the options in the select box. It is possible to let your users download ZIP files that are created immediately if the order contains less than the specified number of files. If for example you have selected 5 or more files, then the normal Download ZIP buttons appear on order pages with less than 5 files. If an order contains more than 5 files, then the page will show a button that reads Send me a download link to a single ZIP file (the button text can be changed by editing the constants file constants-download.txt, constant name cSendDownloadLink).
Clicking this button will show a dialog where the user can enter an e-mail address. This is where the download link will be sent.
Once the job has completed, the order page will hide this button again and it will show the download links instead. So the user may be able to download the file(s) before he/she has received the notification e-mail.

E-mail and constants

You can change the e-mail template that is used to send the e-mails. Its name is filesjobnotification.txt. The e-mail has detailed information about the job. More info about e-mail templates: E-mail configuration and templates.

The labels and messages that are used on the client facing pages can be changed as needed (more info: Website constants). The constants for this function are in the files constants-orders.txt and constants-download.txt.

Download jobs for staff members

Staff members can use the Asynchronous job function to post download jobs for high res files and comps, completely bypassing the order system. You can post jobs for files in your lightboxes, in your batch, in a gallery and for orders created by clients/users.

Download jobs for lightboxes
To post a download job from the lightbox panel, click on Admin in the bar above your lightbox panel. In the dialog, click on Download files to show the available options as shown in the below screen shot:

In the classic full screen lightbox page you’ll find the Admin link in the More tools section in the side bar. And if you have lightboxes in a modal dialog enabled, you’ll find the Admin link in the toolbar on the top right.

Download jobs for files in your batch
To post a job for your batch, open the Batch dialog and click on the Download button in the tool bar. The same dialog as described under Download jobs for lightboxes will appear.

Download jobs for files in galleries
Open the Gallery manager dialog and click on the gallery that you want to download. Then click on the Download button in the tool bar.

Download jobs for files in a user’s order
Find and open the order in Order management. Then click on Download in the toolbar at the top of the order page.

Posting to AWS

You can have the files copied to an account on Amazon S3 storage, e.g. for further distribution to agents, to create extra backups and so on. You can change the properties for each job, but considering that you’ll most likely use the same settings every time, you can store the AWS defaults. Go to Site configuration, and click on AWS settings in the sidebar (near the bottom). Enter your AWS account information and click Save.

The below screen shot shows the job properties dialog with the AWS option selected:

Viewing and/or cancelling jobs

Administrators/Staff members can view the status of all jobs via Website logs in Backoffice. Click on the tab File jobs for an overview. You can filter for jobs posted by admins or users, and you can filter for specific job types (e.g. orders, lightboxes, batches, galleries). If a job has not yet completed, it can be cancelled by clicking on Cancel job in the status column. Job entries are automatically removed from the database after 14 days, and the ZIP files are removed after 48 hours.