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

190
Visualizações
How do I send an image as a "Base 64 encoded file content string" in my API call?

I'm using Postman and trying to send a POST request to an API with an image, one of the required parameters to do so is a file "Base 64 encoded file content string. Maximum file size to upload 5Mb". Not sure what else I can try.

the example they give in the documentation is:

"file": "https://example.com/image.png"

*from:

curl -i -u <api_username>:<api_password> -H "Content-type: application/json" -H "Security-Key: <your_private_key>" -XPOST https://api2.questblue.com/fax/send -d "{"did_from": 3332224444, "did_to": 1112223333, "file": "https://example.com/image.png"}"

I tried uploading a test image to a image hosting site then included its link that but got: "error": "File Type is not Supported" (My test image was also a png) filetypes accepted are:(string)jpeg, jpg, gif, png, tif, tiff, pdf, doc, rtf, ods, xls, csv, ppt, txt, rar, zip, 7z4

I've also tried running my test image through https://www.base64decode.org/ then used the string it output but received an error saying URI was to long.

*I also just tried uploading the file, got the same File Type is not Supported error:

var fs = require('fs');
var options = {
  'method': 'POST',
  'url': 'https://api2.questblue.com/fax/send',
  'headers': {
    'Content-type': 'application/json',
    'Security-Key': 'key',
    'Authorization': 'auth'
  },
  formData: {
    'did_from': 3332224444,
    'did_to': 1112223333,
    'filename': 'testfax',
    'file': {
      'value': fs.createReadStream('C:/Users/zee/folder/testfax.jpg'),
      'options': {
        'filename': 'C:/Users/zee/folder/testfax.jpg',
        'contentType': null
      }
    }
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});```
about 4 years ago · Juan Pablo Isaza
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