python - Django: MP3 file being opened, not saved, on Apple devices -


i working python , django 1.9.

i manage serve mp3 file download , works fine on computer , on android phone. however, on ipad, file isn't downloaded , saved file; directly opened in both safari , chrome browsers.

is there way save file on ipad?

this code snippet i'm using:

fsock = open(filename, 'r') response = httpresponse(fsock, content_type='audio/mpeg') response['content-disposition'] = "attachment; filename=%s.mp3" % (filename) return response 

is there should change in code or rather constraint apple's os avoid saving downloaded mp3 files directly browser?


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -