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

142
Vistas
_path2.default.basename is not a function using convertapi in angular

I am trying to integrate the convertapi in my Angular 11 application using the following documentation

https://www.npmjs.com/package/convertapi

I need to convert the pdf's into images,

When I try to upload a file, I get

_path2.default.basename is not a function

Here is how I have implemented this in my component

Import

import ConvertAPI from 'convertapi';

Initiate

const convertapi = new ConvertAPI('my actual api-secret ');

And convert

convertapi.convert('jpg', { File: file }) //'file' is actual file object, also tried pdf url
      .then(function(result: any) {
      console.log(result)
})
.catch(function(e: any) {
      console.log(e.toString()); // this prints out the error message
});

Is there anything I am missing?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This library is a non module, please refer to this question on how to use it with Angular: Angular 2+ Import a Non Module into TS

This is the documentation: https://github.com/ConvertAPI/convertapi-js

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