views:

193

answers:

1

Is it possible to play a media file which is outside the webroot using the Jquery Media Plugin. The server that we are on is windows based. The file path for example is:

\server\share\music.mp3

In my testing so far it does not seem possible.

A: 

You won't be able to reference it directly, no. But you could pass it through a local serverside script, making your request-path something like:

getmusic.php?id=music

The getmusic.php script will have access to non-public directories. It can read the mp3 contents, and then spit them back out to the end-user. Be sure to be very skeptical of all requests to this file though, since it opens up the possibility for security-issues.

Jonathan Sampson
Would you happen to know of any c# asp.net examples?
Rupert
http://stackoverflow.com/questions/2230457/c-net-returnign-a-file-to-the-browser is a follow up question.
Rupert
@Rupert: If you felt this answered your question, please consider accepting it.
Jonathan Sampson