Skip to content

Commit

Permalink
encode file name
Browse files Browse the repository at this point in the history
  • Loading branch information
bidyashish committed Dec 19, 2024
1 parent 272e503 commit 5d4b424
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ export class StudentControllerService {
);
}

const encodedFileName = encodeURIComponent(studentFile.fileName);

response.setHeader(
"Content-Disposition",
`attachment; filename=${studentFile.fileName}`,
`attachment; filename*=UTF-8''${encodedFileName}`,
);

try {
Expand Down

0 comments on commit 5d4b424

Please sign in to comment.