Valid for Sitecore
5.3
Is it possible to place a file to the Media Library and save it on the HDD instead of storing it in a database?
Q:
Is it possible to place a file to the Media Library and save it on the HDD instead of storing it in a database?
A:
Follow the steps below to accomplish this task:
- Copy the PDF file to a folder (i.e. /pdf). You can use FileExplorer for this purpose.
- Enter Sitecore.
- Go to the Media library folder.
- Select Add item from template.
- Choose the /system/media/unversioned/pdf template and create an item.
- Enter the path to your pdf file in the Path field (i.e. /pdf/myfile.pdf).
- Save.
- Go to your content item.
- Open the HTML editor for the content field.
- Select the text that should link to the PDF file.
- Press the InsertSitecoreLink button.
- A dialog appears. Switch to the Media tab and select your PDF.
- Accept and save.
- Publish. A link appears on the web site pointing to the PDF file.
Most of the above can be automated by adding a custom file watcher to the /pdf folder.