How to download a file with plus symbol(+) filename in IIS?
Original post link:
Today I get a ticket with our client that they could not download a file with plus symbol(+) filename, such as the filename is a+b.xls
.
Firstly, I consider if the file is deleted on the server by someone, so I remote to the server and have a check. But...all going well. The file is here.
Then I search if someone has had this problem on the Internet. A lot of answers say that+
is a specific symbol in browser. It should be transcoded into %2B
. So I add the js code as below and try again. fileName=fileName.replaceAll("\\+","%2B");window.location.href = conf.webAPIRoot + fileName;
But...it doesn't work for me.
In another answer found in . It should be set in IIS. After the setting, I try again and it works for me.
Request Filtering -> Edit Feature Settings -> Allow Double Escaping