URLEncoder.encode() and a whitespace?

后端 未结 3 1329
庸人自扰
庸人自扰 2021-01-22 14:43

I\'ve got a resource on my server named:

some image.png

There\'s a space in the name. When I type the url into the browser (chrome), it\'s tran

3条回答
  •  不思量自难忘°
    2021-01-22 15:04

    May not be the best solution but you could using path.replace(" ","%20").

    As previously stated both "+" and "%20" should work but if "+" does not I think you have to do a manual replace.

提交回复
热议问题