Changing Protected Download Settings With Filters

Infinite Uploads signs WooCommerce and Easy Digital Downloads file links automatically, and two filters let developers change how long a signed link lasts and which folders are protected. For how the feature works, see How Infinite Uploads Protects WooCommerce and Easy Digital Downloads Files. Protected downloads are included with Business plans.

Signed download links last 600 seconds (10 minutes) by default. Use the infinite_uploads_signed_url_ttl filter to change it. The value is in seconds, and the minimum is 60.

add_filter( 'infinite_uploads_signed_url_ttl', function () {
	return 1800;
} );

This example makes links last 30 minutes. A download that has already started keeps going after the link expires, so you only need a longer window if customers wait a while before clicking.

Protecting another folder

By default the protected folders are woocommerce_uploads (when WooCommerce is active) and EDD's upload folder (when EDD is active). Use the infinite_uploads_protected_download_folders filter to add a folder. Folders are matched by their whole name, so woocommerce_uploads-old is not protected by woocommerce_uploads.

add_filter( 'infinite_uploads_protected_download_folders', function ( $folders ) {
	$folders[] = 'member-files';
	return $folders;
} );

Note: Only add folders whose downloads go through WooCommerce or EDD, so they get a signed link. The CDN refuses every unsigned request to a protected folder, so any other link to files in that folder stops working.

The folder list is sent to Infinite Uploads automatically when an administrator is in the WordPress Dashboard. The plugin rechecks it about once an hour, so allow up to an hour for a change to take effect.

Get Support

Need help with protected downloads or have questions? Submit a support request and a member of our team will get back to you within 24 hours. If you are having a problem, we would love the opportunity to resolve any issues. Create a ticket at https://infiniteuploads.com/support/