Quote:
Originally Posted by amnesia623
Thanks Andrew, I will try the suggestions above!
I am wondering if you could explain the local_file_root and local_file_root_prefix because I am not sure how this effects the way I specify the uploads directory root.
I have nothing set in the local_file_root_prefix and the local_file_root set to no. I have the uploads dir specified as media/demo/.
If I were to call the mp3 file from a browser I would put www.domain.com/forum/media/demo/1/filename.mp3 (the 1/filename is appended by LDM).
Thanks for your help, this add-on is going to be a key feature for my site and I appreciate your help!!!
|
Normally local_file_root and local_file_root_prefix are unset. They are available to increase security on your site.
Setting local_file_root tells LDM to locate local files (ie file held on the server) relative to the root directory of the server, rather than the default which is relative to the root directory of the web site. (e.g. your web site might actually be sitting somewhere like /users/your/website/dir)
Setting local_file_root_prefix places a fixed prefix in front of all local file names. This is *always* a good idea if local_file_root is set, and *may be* a good idea if it is not set. It ensures that people can't go walkabouts on your server.
If you set local_file_root and local_file_root_prefix, then these also modify where LDM looks for the specified uploads directory.
e.g., suppose you set upload_dir to /forum/media/demo/ and do not set local_file_root and local_file_root_prefix. Then the files will be found where you say, i.e.
www.domain.com/forum/media/demo/1/filename.mp3
If you leave local_file_root unset and set local_file_root_prefix to /forum, then the same setting of upload_dir would mean that files could be found at
http://www.domain.com/forum/forum/me...1/filename.mp3
If you set both, then it would place the files outside your web tree, and no diurect url could find them.
However, the url
http://www.domain.com/forum/local_st...=stream&id=NNN would find the file correctly.
Clear?