How to turn off encoding in NestJs

  Kiến thức lập trình

I have some troubles with encoding file in NestJs. I’m sending file named IEGS1-2026, and fetch it throught GET, and got IEGS1-2026-a92e.pdf.
I changes my files.utils.ts. Now it looks like this

import { extname } from 'path';

export const fileName = (req, file, callback) => {
  const originalName = file.originalname;
  callback(null, originalName);
};

But anyway there is random words and numbers in the name of the file.

New contributor

Andrew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT