Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

145
Vistas
Download an image from a webapp directly to the Photo Library with JavaScript

TL;DR Is there a way to download a content from a webapp directly to the mobile's Photo Library?

I have been looking for a way to share an image from my webapp to Instagram. I followed this great comment and tried to implement it.

For me, instagram-stories://share doesn't work (sometimes it opens the editing page and sometimes it doesn't) but I was able to use instagram://library?AssetPath="" - this link opens the "post to instagram" page and takes the last photo you have on your Photo Library.

So I am triggering a download function to download the image to the user device

const generate = async (url) => {
        const image = await fetch(url);
        const imageBlob = await image.blob();
        const imageURL = URL.createObjectURL(imageBlob);
        const link = document.createElement('a');
        link.href = imageURL;
        link.download = 'file-name';
        document.body.appendChild(link);
        link.click();
        document.body.removeChild(link);
    };

but it seems like it downloads it to the Download folder (on iPhone IOS 15.5). Then I need to manually save it to the Photo Library - is there a way to download a content from a webapp directly to the Photo Library?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda