We are often asked by customers "What's the difference between storing attachments within the database or on the file system
within InstantKB?". This article hopes to answer this question and provide further information on why we offer both options.
After installing InstantKB you will notice within the Admin Control Panel / Settings / Knowledgebase page we provide an option for you to select where you wish to store file attachments you associate with articles. You can choose to save attachments within your SQL Server database or as a standard file on your web servers hard dive.
Both these methods have various pros and cons and the right option may differ for you depending on your requirements
Storing Attachments in the Database
If you have attachments you want to keep private we would suggest storing your attachments within the database. We can perform role based security checks before we server the attachment to users when it's stored within the database. If you store attachments on the file system
users may be able to guess the direct URL to your attachment.
If you store attachments in the database we can optionally search these attachments if you have the SQL Server full text service enabled
. See searching attachments within InstantKB
Easy load balancing.
No need to configure a central file share / UNC share or configure virtual directories in your InstantKB instances pointing to the central uploads folder.
As all attachments are stored in the database you only need to back-up your database. If you store attachments on the file system
you may need to back-up your database and "Uploads" folder as part of your back-up procedure.
SQL Server database space is fairly expensive compared to traditional hard drive space. If you have lots of attachments this could take up lots of space in your database. If your on a sahred hosting account your hosting company may charge for this additional space.
Storing Attachments on the file system
If you choose to save attachments to the file system
by default all attachments will be saved to the "/Uploads/Attachments" folder found within the root of your InstantKB installation.
Note: You can customize where to save attachments by providing the full physical path to your "Uploads" directory within the "InstantASP_UploadPath" application setting found within the web.config file. If your in a load balanced environment you can also use the "InstantASP_UploadPath" application setting to point to a central UNC share containing your Uploads folder. You can then add a virtual directory to each InstantKB instance within IIS called "Uploads" and point this to your central uploads folders on the file server.
- Lower cost.
Storage on your file system
is often significantly cheaper than SQL Server database space.
- Easy linking.
You can link directly to specific files. No need to go through the Attachment.aspx page.
Users can guess the direct URL to your attachments. No role based security checks.
We cannot index attachments on your file system
and so these won't be included within any search performed within InstantKB. We will of course still search the article title, body and tags.
How can i link to files on a 3rd party site?
If you would like to link to files or attachments not on your web site you can use the related links feature available when editing any article to link to the 3rd party file directly via a URL. Optionally as all articles within InstantKB are simply HTML behind the scenes you can simply add your own hyperlink into the article to the 3rd party file.
Optionally provide private feedback to help us improve this article...
Thank you for your feedback!