Hi! I created a PR that allows Rails.application.routes.default_url_options for DiskService.
ActiveStorage::Current.url_options is useful when generate the URLs from
ActionController . But if you need to generate the URLs in a background job or rake task, it seems cumbersome to have to define it in another place. Also for my experience can be a bit confusing to other developers.
I think that we can use
ActiveStorage::Current.url_options || Rails.application.routes.default_url_options as source for
url_options . This approach allows override global
ActiveStorage::SetCurrent if needed.
What do you think? Thanks!