Display download button for large PDFs
What does this MR do and why?
This MR adds the ability to display a Download button when a PDF is too large to be displayed by the blob viewer.
With changes in this MR a PDF that is larger than 10 MB
OR more than 50 pages
will not be rendered, instead a download button will be displayed.
Screenshots or screen recordings
file | screenshot |
---|---|
1 page (46.18 KiB) | |
12 pages (10+ MB) | |
126 pages (5 MB) |
How to set up and validate locally
- Enable the blob refactor
Feature.enable(:refactor_blob_viewer)
- View a large PDF
- Notice the Download button
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #324339 (closed)
Edited by Jacques Erasmus