Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Download PDFs as blobs to avoid empty grey screens #2851

Merged
merged 2 commits into from
Apr 1, 2019

Conversation

turt2live
Copy link
Member

#2847 to release

Fixes element-hq/element-web#8605

The grey screen of sadness comes up when Chrome tries to open the PDF but doesn't have the right CSP headers. To avoid this, we'll just force a download of the PDF through `fetch` and `Blob`. 

There are a few cases where the user might still get a grey screen though: namely if they open the URL in a new tab or when the event content is lying about the file type, or the file is too large to blobify.

`fetch` works in Chrome, Firefox, and our packaged Electron version.
@turt2live turt2live added the X-Release-Blocker This affects the current release cycle and must be solved for a release to happen label Mar 29, 2019
@jryans jryans merged commit ae71fd1 into release-v1.0.6 Apr 1, 2019
@turt2live turt2live deleted the travis/1.0.6-fire/2847 branch April 1, 2019 16:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
X-Release-Blocker This affects the current release cycle and must be solved for a release to happen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants