I want users to be able to upload mp3s and also be able to play them through a player embedded on a page. I know it's impossible to stop dedicated users from copying the audio by directly recording it from the computers output but I want to make it difficult or impossible for a user to just copy a URL and paste it which will allow them direct access to the data.
Currently, what I am doing is:
- Saving the mp3 files to a directory that is not accessable to my web server.
- Using headers to change the mime type to text/html instead of audio/mpeg (my swf player doesn't care it just reads the data)
The problem is the url to the controller that feeds the data is accessable. So if a user looks at the source of the page and copy pastes the url in the address bar, the web server will happily spew the mp3 data to them.
Does anyone have any suggestions on how to make this more difficult to do? Thanks.