Return to doc.sitecore.com

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:

  1. Copy the PDF file to a folder (i.e. /pdf). You can use FileExplorer for this purpose.
  2. Enter Sitecore.
  3. Go to the Media library folder.
  4. Select Add item from template.
  5. Choose the /system/media/unversioned/pdf template and create an item.
  6. Enter the path to your pdf file in the Path field (i.e. /pdf/myfile.pdf).
  7. Save.
  8. Go to your content item.
  9. Open the HTML editor for the content field.
  10. Select the text that should link to the PDF file.
  11. Press the InsertSitecoreLink button.
  12. A dialog appears. Switch to the Media tab and select your PDF.
  13. Accept and save.
  14. 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.