Webserver: Static pages and files
However, the web server does not deliver arbitrary files from your hard disk. When a request is made for a file, it is looked for in the following directories:
- <Nemp program directory>\HTML\Common\. Files that are to be used in all themes can be stored here.
- <Nemp program directory>\HTML\<theme directory>\. Files that are only relevant for one theme should be stored in the folder where the templates for the theme are located.
The theme directory has priority, i.e. the requested file is searched there first.
For the display of covers in the web server the files are used, which are located in the cover directory. This is also used by Nemp itself for displaying covers. The path to this directory is not visible to the user of the web server.
For the display of a cover in the web server a URL in the form http://localhost/cover?id=35128DC851BEEAC3C8F62E30C3C87F3B is used. The parameter id specifies the internally used CoverID.
Download of audio files
The web server can also allow the download of audio files from the playlist or the media library. Again, the files are not addressed directly. A link to a file download has the form http://localhost/some-song.mp3?id=123456&action=file_download. The browser should use the specified file name as default in the save dialog, or store the file under this name in the download directory. The parameter id is important here. Nemp will search for the audio file with this id in the playlist or media library and send this file to the browser.