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

145
Visualizações
_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 Respostas
Responde à pergunta

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 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