add blobs proxy controller
This commit is contained in:
@@ -98,7 +98,7 @@ module Submissions
|
||||
end
|
||||
|
||||
link =
|
||||
Rails.application.routes.url_helpers.rails_blob_url(document, **Docuseal.default_url_options)
|
||||
ActiveStorage::Blob.proxy_url(document.blob)
|
||||
|
||||
[
|
||||
composer.document.layout.formatted_text_box(
|
||||
@@ -228,7 +228,7 @@ module Submissions
|
||||
Array.wrap(value).map do |uuid|
|
||||
attachment = submitter.attachments.find { |a| a.uuid == uuid }
|
||||
link =
|
||||
Rails.application.routes.url_helpers.rails_blob_url(attachment, **Docuseal.default_url_options)
|
||||
ActiveStorage::Blob.proxy_url(attachment.blob)
|
||||
|
||||
{ link:, text: "#{attachment.filename}\n", style: :link }
|
||||
end,
|
||||
|
||||
@@ -131,7 +131,7 @@ module Submissions
|
||||
height - (area['y'] * height) - lines[..next_index].sum(&:height) + height_diff
|
||||
],
|
||||
A: { Type: :Action, S: :URI,
|
||||
URI: h.rails_blob_url(attachment, **Docuseal.default_url_options) }
|
||||
URI: ActiveStorage::Blob.proxy_url(attachment.blob) }
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ module Submitters
|
||||
def rails_storage_proxy_url(attachment)
|
||||
return if attachment.blank?
|
||||
|
||||
r.rails_storage_proxy_url(attachment, **Docuseal.default_url_options)
|
||||
ActiveStorage::Blob.proxy_url(attachment.blob)
|
||||
end
|
||||
|
||||
def r
|
||||
|
||||
Reference in New Issue
Block a user