expire download links

This commit is contained in:
Pete Matsyburka committed 2025-09-01 11:59:02 +03:00
1 parent 02c7cdcd97
commit c4a693846e
26 files changed
+184 -78

No files matched your search

@@ -34,10 +34,12 @@ module Api
associations: [:blob]
).call
expires_at = Accounts.link_expires_at(current_account)
render json: {
id: @submission.id,
documents: documents.map do |attachment|
{ name: attachment.filename.base, url: ActiveStorage::Blob.proxy_url(attachment.blob) }
{ name: attachment.filename.base, url: ActiveStorage::Blob.proxy_url(attachment.blob, expires_at:) }
end
}
end