开发者

JQuery Media Plugin playing file outside the webroot

Is it possible to play a media file which is outside the webroot using the Jquery Media Plug开发者_如何学Pythonin. 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜