diff --git a/app/concerns/report_generator/active_storage_download_adapter.rb b/app/concerns/report_generator/active_storage_download_adapter.rb index b36a13e..5adbab6 100644 --- a/app/concerns/report_generator/active_storage_download_adapter.rb +++ b/app/concerns/report_generator/active_storage_download_adapter.rb @@ -9,7 +9,7 @@ def expiring_link(expires_in: ReportGenerator::Download::MAX_EXPIRY) return self.remote_file_url if self.remote_file_url.present? && !self.report.attached? if %i[local test].include?(Rails.application.config.active_storage.service) - ActiveStorage::Current.host = ReportGenerator.config.local_storage_host + ActiveStorage::Current.url_options = { host: ReportGenerator.config.local_storage_host } end self.report.url(expires_in: expires_in.to_i, disposition: "attachment")