Hi there,
I am using SilverStripe 4 (4.13).
I want to organize my uploaded asset files in subfolders (using the id of the data object they belong to).
It is easy using “setFolderName(‘my/custom/subfolder/$ID’)” on SilverStripe\AssetAdmin\Forms\UploadField.
But the folder is always created, even if I do not upload a file.
So this results in polluting the uploads directory with many empty subfolders.
Is there a way to create the folder only on demand (if there is actual a file uploaded)?
Or is there some kind of an after upload hook?
Thank you