I think it would be better if we could simply disable the online view for large PDF files, I have many pdf files that go up to more than 1 gb and it seems like a waste how the browser tries to download the full file to preview it, it would be good to have a setting for disabling the online view or a making a prompt to ask the user if he really wants to open the PDF file within the browser.
# Whether to use pdf.js to view pdf files online. Default is `True`, you can turn it off. # NOTE: since version 1.4. USE_PDFJS = True # Online preview maximum file size, defaults to 30M. FILE_PREVIEW_MAX_SIZE = 30 * 1024 * 1024
Depending on what you mean by view: Some browsers always open PDF files in their viewer. That behavior is a browser specific setting.