diff --git a/app/serializers/api/v1/asset_serializer.rb b/app/serializers/api/v1/asset_serializer.rb index 13edf402d..e6c28a968 100644 --- a/app/serializers/api/v1/asset_serializer.rb +++ b/app/serializers/api/v1/asset_serializer.rb @@ -16,7 +16,7 @@ module Api end def file_url - rails_blob_url(object.file, disposition: 'attachment') if object.file.attached? + object.file.url if object.file.attached? end end end diff --git a/app/serializers/api/v1/report_serializer.rb b/app/serializers/api/v1/report_serializer.rb index 870a05230..971666e76 100644 --- a/app/serializers/api/v1/report_serializer.rb +++ b/app/serializers/api/v1/report_serializer.rb @@ -22,7 +22,7 @@ module Api end def pdf_file_url - rails_blob_path(object.pdf_file, disposition: 'attachment') + object.pdf_file.url if object.pdf_file.attached? end def docx_file_size @@ -30,7 +30,7 @@ module Api end def docx_file_url - rails_blob_path(object.docx_file, disposition: 'attachment') + object.docx_file.url if object.docx_file.attached? end end end