After clicking a button I download the file into src/main/resources/static/download/play/1.mp3.Everything is OK until here.
But I can't access the file and also got 404 error even though file downloaded.
How can i reach the audio?
After clicking a button I download the file into src/main/resources/static/download/play/1.mp3.Everything is OK until here.
But I can't access the file and also got 404 error even though file downloaded.
How can i reach the audio?
You did not provide any information on how your application is written, built or deployed, or what URL you're expecting your audio file to be available under so it's impossible to tell with any degree of certainty what may be wrong.
I'm going to take a stab in the dark and say that the answer is somewhere in here.
Edit:
It seems that I was right. According to the article I linked to above, if you place your file in src/main/resources/static/download/play/1.mp3
, it’ll be available under http://localhost:8080/static/download/play/1.mp3
and not under http://localhost:8080/download/play/1.mp3
. You need to either move the file or change the link.