% if defined?(shareable_document) && shareable_document pdf_url = asset.file.url(disposition: 'attachment', expires_in: Constants::URL_SHORT_EXPIRE_TIME.minutes) pdf_size = asset&.blob&.byte_size elsif report_document pdf_url = rails_blob_path(asset, disposition: 'attachment') pdf_size = asset.blob.byte_size else pdf_url = asset.pdf? ? asset_download_path(asset) : asset_pdf_preview_path(asset) pdf_size = !asset.pdf? && asset.pdf_preview_ready? ? asset.file_pdf_preview&.blob&.byte_size : asset.file_size end blocked = pdf_size > Constants::PDF_PREVIEW_MAX_SIZE_MB.megabyte %>
<%= t('pdf_preview.blocked.title') %>
<%= t('pdf_preview.blocked.description') %>