Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.9k views
in Technique[技术] by (71.8m points)

java - get encoder file name in postman

My API have file download controller, file name on cyrillic. In Postman Send and Download give me file name like:

%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9.docx

When i send request in chrome i get right file name on cyrillic like:

русский.docx

Corresponding line of my api java code:

response.setHeader("Content-Disposition","attachment; filename=" + URLEncoder.encode(fileName, StandardCharsets.UTF_8));

How get right file name on cyrillic in Postman?

In Crome i have

enter image description here

after request file automatically downloaded

enter image description here

In Postman enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...