Serve audio file with Spring boot
up vote
0
down vote
favorite
I'm using Spring boot 1.5 with Undertow to serve an angular 5 application. The application it's working but I have the following issue. I want to play an audio file on the client and I can't. On the browser I can confirm that the audio file exist with status code 206 Partial Content but is unable to play the audio file when it's needed. When I access directly the file from the browser "http://localhost:8080/app/assets/audio/beep-sound.mp3" I can listen to the audio. Also when I serve the application using angular-cli the audio it's working fine. Do I need any configuration in the spring boot to enable this functionality? Thanks in advance /*HTML file* <audio #audioOption> <source src='assets/audio/beep-sound.mp3' type="audio/mp3"> ...