I may be coming at this from completely the wrong angle (if this is the case then please feel free to tell me so) but....
I have a music app in which a user can upload a music track and then later on preview it.
The directory where the audio is stored is protected with .htaccess to prevent unauthorised access:
deny from all
Protecting this directory obviously prevents the files being accessed by Javascript:
var track = new Audio('path/to/file');
I want to be able to validate the user and then return the track through another script by passing extra info with the request for the page (too much data for a GET request).
var track = new Audio('path/to/script/to/return/audio');
Is this possible? Pretty sure it's not so if you can think of a solution, I'd be keen to hear.