I am trying to download a mp3 file that i have in database to play with strobemediaplayer.strobemediaplayer need to have the file in assests folder so i have this to write the file:
Usually, as Twisted1919 points out, you save the original filename and the location of the file in the database, not the file itself.
To avoid name collisions you normally save the file under a different name, most often a hashed name, so you need to original filename if you want to be user friendly.
change your approach, for your own good do as i say (otherwise you’ll regret when you’ll have a 1Gb database of mp3 and you’ll want to move it around).