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