ActiveStorage: configure file destination during upload

Currently, when the root is configured, all uploaded files go to that directory.

I’d like to be able to modify the root when a form is submitted to create an object with attachments.

This is helpful in our multi-tenant environment where we want to limit storage usage.

Anyone know of a way to do this? Can (should) the config be modified when the request is made?

Thanks