-1

I've built a site with React and Node and I'm using WebShare API for sharing files, but I need to be able to share files that are not supported by the API (in this case pptx).

I thought about converting to PDF and then sharing it but the client wants it as pptx. It also needs to be shared, not downloaded.

Is there any other library that allows for other file extensions or any way of sharing this kind of files?

Thanks!

1 Answers1

0

The Web Share API supports the file types as listed in this document. Your best bet would probably be to use the File System Access API (specifically the showSaveFilePicker() method) to save a copy of the data locally that the user can then share with themselves in an email for example.

Another option (though of course I don't know the details of your use case) could be to integrate with the Drive/Dropbox/… APIs to allow the user to save directly to their cloud storage, or alternatively to integrate with the Gmail API or similar to let the user email themselves the file as an attachment.

DenverCoder9
  • 2,024
  • 11
  • 32
  • This seems to be a more official list of shareable file types: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share#shareable_file_types – Marcel Feb 18 '22 at 06:51
  • 1
    That's correct. It was my [PR](https://github.com/mdn/content/pull/11023) that landed this… `:-)` – DenverCoder9 Feb 18 '22 at 09:10