When you add a file repository or set a file root
for a LabKey web folder, you can use LabKey URLs to display the files.
Controlling File Display via the URL
For example, if you set the file content root for the Home project to
and that file root contains a file named test.html
then the following link will return the file
Files returned this way will be rendered in the browser inside the standard LabKey template.
To render content in another way, add the renderAs parameter to the URL. For example to display the file without any framing, use the following URL
Possible values for the renderAs parameter are shown below:
- renderAs=FRAME - Cause the file to be rendered within an IFRAME. This is useful for returning standard HTML files.
- renderAs=INLINE - Render the content of the file directly into a page. This is only useful if you have files containing fragments of HTML, and those files link to other resources on the LabKey Server, and links within the HTML will also need the renderAs=INLINE to maintain the look.
- renderAs=TEXT - Renders text into a page, preserves line breaks in text files.
- renderAs=IMAGE - For rendering an image in a page.
- renderAs=PAGE - Show the file unframed.
Named File Sets
If the target files are in a named file set
, you must add the fileSet parameter to the URL. For example, if you are targeting the file set named "store1", then use a URL like the following: