File Sharing
When using navigator.share() API, the user can customize the share behaviour based on the parameters.
If you want to share a normal text on any platform.
To share a file as a doc, image, etc.
Add the following parameters to share the file:
type: “file” or “url”
file: Indicate the sharing of the file
url: Indicate the sharing of the link
extension(Only for Android): When you are sharing a file, keep in mind that you add a proper extension. Don’t include a full stop while writing the extension of the file. For example, doc, docx, and pdf.
url: Link of the respective file or url to be shared.
text (Optional): A message or description of the file being shared.
Last updated
Was this helpful?