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

336
Visualizações
MInio presigned url upload issue

I have an issue with the Minio presigned url , I've been able to get the url and to use the PUT method to insert my file into my Minio bucket but i could not open it especially when it is a jpg , a png or a pdf file because it's automatically modified by Minio who adds a header and a footer to the file what makes it unreadable as an image

exemple of header :

----------- 591397828093304071314847
Content-Disposition: form-data; name="file"; filename="y.png"
Content-Type: image/png

Here's what i got when i download it using the presignedGetObject the problem is with the metadata added by minio.

enter image description here

I'm using Nodejs , here is my code :

service.js:

exports.presignedurl = async (filename) => {
  return await minioClient.presignedPutObject(
    process.env.MINIO_BUCKET,
    filename
  );
};
exports.getpresignedurl = async (filename) => {
  return await minioClient.presignedGetObject(
    process.env.MINIO_BUCKET,
    filename,
    24 * 60 * 60
  );
};

controller.js

exports.presignedurl = async (req = null, res = null) => {
  try {
    let filename = req.query.filename;
    let result = await StorageService.presignedurl(filename);
    res.status(200).json(result);
  } catch (err) {
    res.status(405).send({ error: err.message, code: err.code });
  }
};
exports.getpresignedurl = async (req = null, res = null) => {
  try {
    let filename = req.query.filename;
    let result = await StorageService.getpresignedurl(filename);
    res.status(200).json(result);
  } catch (err) {
    res.status(405).send({ error: err.message, code: err.code });
  }
};
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The key in this case is how the file is uploaded from the postman. While uploading the file, you need to use Body > Binary > Select File, rather than using the Body > Form-Data.

Source: https://stackoverflow.com/a/66413354/16587713

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