so I have the situation when I need to return CSV/excel file on a POST request. The problem is to return the filename in different languages, such as Chinese, German, etc. As far as I know, there're 2 ways to do that:
Content-Disposition: attachment; filename="привет.txt"
Content-Disposition: attachment; filename*=UTF-8''%some%encoded%name.txt"
.Both of them do not work with Postman/Browser, but the second one works fine with Swagger. The first way returns something like this Content-Disposition: attachment; filename="???.txt"
. The second one returns absolutely the same text of filename quotes (encoded UTF-8, for instance: UTF-8''%some%encoded%name.txt
. I'm using Java Spring stack.
So the answer was to process that Content-Disposition header on the UI part by encoding it after UTF-8'' symbols.