feat: workflow filter assets by upload path (#30000)

Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
This commit is contained in:
Ben Beckford
2026-07-17 09:46:48 +00:00
committed by GitHub
co-authored by Daniel Dietzler
parent f2c00c107d
commit 12fc8bac18
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -103,6 +103,12 @@
"default": false,
"title": "Case sensitive",
"description": "Whether matching should be case-sensitive"
},
"usePath": {
"type": "boolean",
"default": false,
"title": "Use path",
"description": "Match the full path on the server instead of the original filename"
}
},
"required": ["pattern"]
+2 -2
View File
@@ -54,11 +54,11 @@ const methods = wrapper<Manifest>({
},
assetFileFilter: ({ data, config }) => {
const { pattern, matchType = 'contains', caseSensitive = false } = config;
const { pattern, matchType = 'contains', caseSensitive = false, usePath = false } = config;
const { asset } = data;
const fileName = asset.originalFileName || '';
const fileName = usePath ? asset.originalPath : asset.originalFileName;
const searchName = caseSensitive ? fileName : fileName.toLowerCase();
const searchPattern = caseSensitive ? pattern : pattern.toLowerCase();