I am currently using AngularJS to download files by sending GET requests. The file I am trying to download is named flower-red.jpg. Here is an example of my request:
GET http://localhost:8080/aml/downloadDoc/852410507V/flower-red.jpg
The download is successful when there are no spaces in the file name. However, when the file name includes spaces, such as flower - red.jpg, the download does not work. The request appears like this:
GET http://localhost:8080/aml/downloadDoc/852410507V/flower%20-%20red.jpg
Due to the spaces in the file name, the request is not processed correctly. How can I resolve this issue?