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

343
Vistas
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 Respuestas
Responde la pregunta

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