I am using web-share level 2 for my PWA app. Every media format is working fine except PDF. Web api is returning base64 string of PDF, At client side, I am creating blob object from it. but when I share it, Throws exception : Permission Denied
var file = new File(["/9j/4AAQSkZJRgABAQAAAQABAAD...."], 'filename.pdf', { type: 'application/pdf' });
var filesArray = [];
filesArray.push(file);
navigator['share']({files: filesArray})
.then(() => console.log('Share was successful.'))
.catch((error) => console.log('Sharing failed', error));
I don't have any clue whats going on.
For others who might encounter this problem, this was discussed on https://github.com/w3c/web-share/issues/141 and is a current limitation in Chrome tracked in https://crbug.com/1006055
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With