react-pdf-viewer / react-pdf-viewer

A React component to view a PDF document
https://react-pdf-viewer.dev
Other
2.18k stars 240 forks source link

The downloaded document from chrome has no file type. #872

Open MPuida opened 2 years ago

MPuida commented 2 years ago

Hello,

After updating the react-pdf-viewer version to 2.11.0, downloading a file from safari and chrome did not work as expected. At first, downloading on either of these browsers did not include file suffix which is a type of document. The issue was fixed on safari with additional conditions and adding type .pdf manually however, on chrome this issue persists. While fileNameGenerator is provided with a custom name, the file which is being downloaded changes to document with no suffix .pdf. This issue only occurs on mobile phones with IOS operating system.

Kind regards, Mantas

MPuida commented 1 year ago

@phuocng The issue persists on the react-pdf-viewer website. If you go to the Customize the name of download file section while using an iOS device and Chrome browser, the file name becomes document without a file type (it should be named a-copy-of-pdf-open-parameters.pdf).