Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

334
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!