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

196
Vistas
Save a file from the internet in a zipfile with jszip

I did a website to view 3d models and would like to have a option to download them, the download itself is working, however I'm struggeling to include the gltf file itself and have no idea how to do it.

This is the code so far, in the end the zip contains a gltf file, but it contains only the path to the file, not the file itself.

async function downloadModel(id) {
  const model = await this.fetchModel(id);

  var JSZip = require("jszip");

  var zip = new JSZip();
  zip.file("README.txt", "Text\nText");
  zip.file(model.name + ".gltf", model.file);
  zip.folder("textures");

  zip.generateAsync({ type: "blob" }).then(function (content) {
    saveAs(content, model.name + ".zip");
  });
}
about 4 years ago · Santiago Gelvez
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