Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

112
Visualizações
Sharing files over webshare api only partially working on IOS 15

For a webapp I'm building I need to integrate file sharing capabilities. This is now finally possible since the IOS 15 release. However, I only got it partially working. When I share the file with email or messages it works fine. But when I try to share with whatsapp, signal or threema it will only share the title, not the actual file. I don't see any errors in the console or any failed network requests.


    const audioResponse = await fetch(sound.downloadUrl);
    
    const fileBuffer = await audioResponse.arrayBuffer();
    const fileArray = [
      new File([fileBuffer], name + '.mp3', {
        type: 'audio/mpeg',
        lastModified: Date.now(),
      }),
    ];
    if (
      window.navigator.canShare &&
      window.navigator.canShare({ files: fileArray })
    ) {
      navigator
        .share({
          files: fileArray,
          title: name,
          text: 'File share test',
        })
        .then(() => {
          console.log('Success!');
        })
        .catch(console.error);
    }
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I've found the solution. The issue was the title property in navigator.share This lead certain Apps on IOS to believe that I wanted to share the text and not the file.

Pretty frustrating since this works fine in other browsers but at least it's working now.

The following works:

navigator
        .share({
            files: fileArray,
        })
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda