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

659
Vistas
Mammoth/Angular ERROR Error: Could not find file in options when converting docx

It's probably a stupid question but i'm using mammoth to convert docx files to html in Angular (10). I'm choosing the file through an input and converting it to an array buffer when a button is pressed then I send it to mammoth to be converted.

Sadly I get an error at the conversion (the arraybuffer seems ok)

Does anyone know how to fix this ?

Precisions : to convert the file to an arraybuffer i use the file-to-array-buffer module

Convertion function

convertDocument(event):void{
      if (this.fileToUpload!=null){
          fileToArrayBuffer(this.fileToUpload).then((data) => {
          console.log(data);
          
           convertToHtml({ ArrayBuffer : data})
            .then(function(result){
            var html = result.value; // The generated HTML 
            console.log(html);
            var messages = result.messages; // Any messages, such as warnings during conversion 
        })
        .done();
        })
    }
  }
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

just replace ArrayBuffer : data by arrayBuffer : data

that's it...

about 4 years ago · Juan Pablo Isaza Denunciar
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