Fixed PDF's not opening on mobile device

Dammie

Member
I uploaded soms pdf's to the RM. On my iMac I can see the file in Chrome and Safari.

When I try to look at the file on my iPhone in Safari and Chrome is just see some code like the attachment.

Any idea how to solve this?
 

Attachments

  • IMG_5055.webp
    IMG_5055.webp
    148.1 KB · Views: 12
Seems like it's an iphone issue.

It's working on your computer and I just downloaded and viewed a PDF from your site on my computer and my Android without issue.
 
Other iOS devices have the same problem.

I think there is an issue with pdf’s in RM2.2 and iOS.

Maybe other users have the same issues?!
 
This is a test resource on 2.1.10: <removed>

This is a test resource on 2.2: <removed>

Can someone else with an iPhone confirm whether one or both of those work?

The PDF contents are:
1601908042792.png
 
Last edited:
Hi,

2.1.10 works
2.2 not.

It says download file.pdf.html

Maybe the trailing .html is the problem....
 

Attachments

  • 0B57A628-AE6A-4B4F-B49B-03F750FC53C8.webp
    0B57A628-AE6A-4B4F-B49B-03F750FC53C8.webp
    19.1 KB · Views: 8
  • EC8DD19C-D20C-4206-B0F5-E8502D919725.webp
    EC8DD19C-D20C-4206-B0F5-E8502D919725.webp
    35.2 KB · Views: 6
  • 475EA6D6-5A36-4580-8894-3D615A592012.webp
    475EA6D6-5A36-4580-8894-3D615A592012.webp
    203.9 KB · Views: 8
  • 63E4F75C-23D7-421B-B5DF-DD7DEAC01E18.webp
    63E4F75C-23D7-421B-B5DF-DD7DEAC01E18.webp
    54.4 KB · Views: 11
It seems like the .html being appended to the file is causing iOS devices to ignore the actual file extension.
 
We have made some changes here for 2.2.1 that I believe generally resolves this. The issue appears to be a iOS-specific service worker bug or limitation, such that if the request is fetched through that, this behavior happens. We have added bypasses for the service worker for specific attachment and download URLs. It's plausible that this may need to be expanded further in the future.
 
Top Bottom