DisboxApp / web

Use Discord as a file storage service.
https://disboxapp.github.io/web/
GNU Affero General Public License v3.0
470 stars 87 forks source link

not all browsers support the web share api #30

Closed mmccall0813 closed 1 year ago

mmccall0813 commented 1 year ago

when sharing on firefox, i just get an error saying navigator.share is not a function. after doing some googling, i found that only a handful of browsers support navigator.share, firefox not being one of them. you should probably confirm that navigator.share exists, if not, copy to clipboard

DisboxApp commented 1 year ago

Good point! For future reference, it's worth noting I also tried using a polyfill, but the only popular one I found had a compatibility issues when copying that prefixed the share title (or undefined if it's missing) to the URL. Fixed this in #31.

It's worth noting Firefox isn't supported anyway (downloading files doesn't work) so I'm not sure if this is considered a bug - but since this is an easy fix and there are probably some use cases where this functionality would be needed, I don't see any reason not to add it.

Fixed in #31.