{"id":14409,"date":"2026-10-27T09:24:53","date_gmt":"2026-10-27T14:24:53","guid":{"rendered":"https:\/\/infiniteuploads.com\/?post_type=docs&#038;p=14409"},"modified":"2026-10-28T14:41:13","modified_gmt":"2026-10-28T19:41:13","password":"","slug":"changing-protected-download-settings-with-filters","status":"publish","type":"docs","link":"https:\/\/infiniteuploads.com\/docs\/developers\/changing-protected-download-settings-with-filters\/","title":{"rendered":"Changing Protected Download Settings With Filters"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<html><body><p class=\"wp-block-paragraph\">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 <a href=\"https:\/\/infiniteuploads.com\/docs\/compatibility-integrations\/how-infinite-uploads-protects-woocommerce-and-easy-digital-downloads-files\/\">How Infinite Uploads Protects WooCommerce and Easy Digital Downloads Files<\/a>. Protected downloads are included with Business plans.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"changing-how-long-a-signed-link-lasts\">Changing how long a signed link lasts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Signed download links last 600 seconds (10 minutes) by default. Use the <code>infinite_uploads_signed_url_ttl<\/code> filter to change it. The value is in seconds, and the minimum is <code>60<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_filter( 'infinite_uploads_signed_url_ttl', function () {\n\treturn 1800;\n} );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"protecting-another-folder\">Protecting another folder<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By default the protected folders are <code>woocommerce_uploads<\/code> (when WooCommerce is active) and EDD's upload folder (when EDD is active). Use the <code>infinite_uploads_protected_download_folders<\/code> filter to add a folder. Folders are matched by their whole name, so <code>woocommerce_uploads-old<\/code> is not protected by <code>woocommerce_uploads<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_filter( 'infinite_uploads_protected_download_folders', function ( $folders ) {\n\t$folders[] = 'member-files';\n\treturn $folders;\n} );<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">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.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"get-support\">Get Support<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Need help with protected downloads or have questions? <a href=\"https:\/\/infiniteuploads.com\/support\/\">Submit a support<\/a> 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 <a href=\"https:\/\/infiniteuploads.com\/support\/\">https:\/\/infiniteuploads.com\/support\/<\/a><\/p>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Use the infinite_uploads_signed_url_ttl and infinite_uploads_protected_download_folders filters to change signed link expiry and protected store folders.<\/p>\n","protected":false},"author":3787,"featured_media":14463,"template":"","meta":{"_acf_changed":false,"wds_primary_doc_category":0,"wds_primary_doc_tag":0,"footnotes":""},"doc_category":[147],"doc_tag":[],"class_list":["post-14409","docs","type-docs","status-publish","has-post-thumbnail","hentry","doc_category-developers"],"acf":[],"year_month":"2026-11","word_count":316,"total_views":"3","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Blake Whittle","author_nicename":"blakew","author_url":"https:\/\/infiniteuploads.com\/blog\/author\/blakew\/"},"doc_category_info":[{"term_name":"Developers","term_url":"https:\/\/infiniteuploads.com\/docs-category\/developers\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/docs\/14409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/users\/3787"}],"version-history":[{"count":2,"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/docs\/14409\/revisions"}],"predecessor-version":[{"id":14765,"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/docs\/14409\/revisions\/14765"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/media\/14463"}],"wp:attachment":[{"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/media?parent=14409"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/doc_category?post=14409"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/infiniteuploads.com\/api\/wp\/v2\/doc_tag?post=14409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}