Questions tagged [web-share]

63 questions
2
votes
2 answers

navigator.share opens a smaller menu

I am using web share API. This is the code navigator .share({ title: document.title, text, }) When I click the button and the above code is called, the smaller menu for sharing is opened, but I want the other complete menu to be opened.…
Shivam Singla
  • 2,117
  • 1
  • 10
  • 22
2
votes
1 answer

foreach value passing duplication in web share api javascript function

I am trying to share the link of a specific product. In foreach loop, I am calling the products of users so they can share it by pressing share. The API is working. But, every button pass the first id there is duplication and i don't have any…
Ali
  • 155
  • 11
2
votes
0 answers

jsPDF filename not showing for iOS using .output() instead of .save()

I'm on the latest iOS 14.0.1 and jsPDF 2.1.1. Here are 3 scenarios for Safari and Chrome: Safari: Use jsPDF.save('myfilename.pdf'). No issues here, the PDF opens in the same page and then when you hit the browser share button, the share dialog pops…
user1087973
  • 800
  • 3
  • 12
  • 29
1
vote
1 answer

Web Share API Doesn't Work on Firefox (React, NextJS)

The typical code (see below) to get the Web Share API doesn't work on my Firefox browser, but it does on Safari. This applies to both desktop and mobile. // NextJS/React if (navigator.share) await navigator.share(data); But a very similar code…
josealvarez97
  • 75
  • 1
  • 8
1
vote
0 answers

How to implement file sharing with Web Share API in Nuxt with @nuxtjs/pwa

I'm having a hard time to implement sharing an image to my nuxt PWA app. Sharing text was a piece of cake with a simple GET request. But my problems start as soon I as change to a POST request and a service worker is necessary to handle the…
1
vote
0 answers

Web Share API - link and text does not appear on social media

I want to use web share api, so i can share specific image coming from google spreadsheet with text and description, but unfortunatelly only image is being shared to facebook. The text, title and url it's missing. For whatsapp if working fine for…
1
vote
0 answers

File shared using Web Share API automatically changes its name

I just learnt the Web Share API and decided to create a file and share it using the navigator.share(). So I created a files called "sample.txt" by this following code- const parts = [ new Blob(['you construct a file...'], { type: 'text/plain' …
1
vote
2 answers

navigator.share() not working in HTTPS and in a supported browser

I don't understand why navigator.share() is giving me an error even though my website meets all of the requirements listed on MDN (has HTTPS and supported by the browser). The following code gives an error when I click the…
LuisAFK
  • 846
  • 4
  • 22
1
vote
1 answer

Why do Web Share shared files end up with a random name?

I'm using the navigator.share feature to share a PDF generated with jspdf. So far everything is working fine: the file is generated correctly with all the desired contents and it can be shared/downloaded without any major issue. The problem is that…
ariverof
  • 27
  • 1
  • 7
1
vote
1 answer

"Unhandled Promise Rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current context .." with PWA on iOS

I am currently facing an issue while implementing Web Share API (Level 2) in Vue 3 using it to share/download images on iOS 14 (as experimental feature) and iOS 15 in a Progressive Web App context. Observation: When the application is running…
crud21
  • 127
  • 1
  • 10
1
vote
1 answer

Webshare API Javascipt: Preview shared image

I have the following Codepen: https://codepen.io/Jsbbvk/pen/vYeRBZy const onClick = async () => { const blob = await (await fetch("https://source.unsplash.com/random")).blob() const file = new File([blob], 'img', {type: blob.type}) …
Jsbbvk
  • 180
  • 2
  • 19
1
vote
1 answer

File types supported in iOS 15 WebShare

I've started exploring the WebShare API Link. I found that Chromium has a limitation to what file types can be shared. I need to be able to share different file types like .xlsx and .docx for example. I'm unable to find any information on what types…
1
vote
2 answers

Sharing on React JS Mobile application

I am trying to get my application to allow sharing to other apps but I can't seem to figure it out. I am using React JS and have tried to use the following code // Check if navigator.share is supported by the browser if…
Ndango
  • 59
  • 8
1
vote
1 answer

How to share a file using Web Share Target API?

How can I share a file using Web Share Target API? I managed to make my Progressive Web App appear when I try to share a file from the gallery app on my phone. My question is how can I take the file and send it to the server or fill a HTML input…
1
vote
0 answers

navigator.share (Web Share api) share React App text instead of my custom text

Yes, I'm using HTTPS. Yes, I'm in a browser that supports Web Share Api (Safari 13.0.4). It does share correctly, but just not using the text I provided and yes a generic text of: "React App localhost this website was created using…
W. Lucas
  • 23
  • 1
  • 6