just in case someone finds this searching for errors concerning ActiveStorage:
if you have a controller-action where you want to generate upload-urls etc with the local disc-service (most likely in test environment), you need to include ActiveStorage::SetCurrent
in the controller in order to allow blob.service_url_for_direct_upload
to work correctly.