Forums

'Accept-Ranges' response header missing in static mp3 file handling

My Django app serves static and media files via the built-in static file serving.

I had to create a separate view to handle mp3 file serving cause the default static file handling doesn't add the 'Accept-Ranges' request header. I'd have liked that to be set to 'bytes'.

With the default setup, my mp3 files' progress wasn't controllable in all Chromium-based browsers.

If possible, I'd like to use the faster straight-off-the-disk default media file serving.

Our static files do not support http ranges. If you want to use ranges, you will need to serve the files through your code and implement the range handling there.