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

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -