Skip to main content
A folder rule applies defaults and limits to every new file whose path starts with a prefix, so your app does not have to repeat them on each upload. Prefixes are saved with a trailing /, and when several rules match, the longest prefix wins. delete_after_days starts counting 24 hours after the rule is saved, which gives you time to undo a mistake. The rule’s active_from field shows when it begins to apply. The number of rules per account depends on the plan: 5, 10 or 20 (limits). Exceeding it answers BLOB_RULE_LIMIT. A rule must set at least one field; expire_seconds can’t be below the plan’s minimum expiration (7 days, or 1 hour on Enterprise-26 or higher); extensions takes 1 to 50 items of 1 to 16 lowercase characters, without the dot. Replacing the whole list takes at most 100 rules.

Editing safely with If-Match

Reading the rules returns the list and an etag. Replacing the whole list requires that etag in an If-Match header; if another tab or script changed the rules meanwhile, you get BLOB_RULES_CONFLICT instead of silently erasing their work. Single-rule routes (put and delete by prefix) return the full list with a new etag.
Reference: Get rules, Replace rules, Put rule, Delete rule.