[Solved] Workflow - folder name based conversion or tagging

Aim is to get all files uploaded to specific location converted using “Convert media” flow or tag by Automated tagging with specific tag and then convert using.

It must be my missing knowledge though tests suggest that “File name” portion of the filter is really looking only at filename and not full path. This limits to catch parent (or top) folder name.

Confirmation of the fact that only filename (not a full path) is shared with flow was tested through:
/test.*wav$/ and uploading file names test.wav prompted flow, but uploading file to folder named test, effectively giving path test/other.wav didn’t prompt flow whilst still should catch on JavaScript.

Looking at Flow: files uploaded in specific folder - #6 by j-ed, I’ve managed to get the file automatically tagged, though it doesn’t then get converted (second flow, based on tag). Tried with trigger of “Tag assigned” together and separately with “File created” - none worked.

The conversion based on tags is what doesn’t work. At the same time conversion based on filename (not folder) worked.

What am I missing?

I’ve been forcing cron jobs to be run, to make sure don’t have to wait for another iteration.

Similar topics:

Solved. Weirdest thing - nothing has been done from my end between test and now when it started to work (well started further tests with path matching directly on Flow Media Convert, but that didn’t touch conditions it started to work for) - I’ve no idea why it started to work.

What didn’t work is matching based on MIME type.
Tested:
“is” => “audio/x-wav”
“matches” => “/audio/x-wav/”

And couple other variations. Running “mimetype” or “file --mime-type” gets exactly audio/x-wav.


Nextcloud:25 (docker)