HowTo: Add a bucket to your NFS Server

Follow

Caution: This is an advanced capability of NFS. Mistakes can cause the system to malfunction. 

  1. Create a folder on the NFS server to store the binaries. For example, a folder to store binaries for all customers within the NFS instance might be 'D:\SiteData\binaries'. Alternatively, a folder to store binaries for a specific customer within the NFS instance might be 'D:\SiteData\MyCustomer\binaries'.
  2. Modify the SET statement(s) accordingly in the following SQL query, then execute it against the database for the NFS instance


DECLARE @RootPath VARCHAR(max)
DECLARE @BucketName VARCHAR(100)
SET @BucketName = 'FileSystem'
SET @RootPath = 'D:\\SiteData\\binaries'
BEGIN TRANSACTION
DECLARE @sql VARCHAR(max)
SET @sql = '{"rootPath": "' + @RootPath + '"}'
INSERT INTO BinaryBucket ( Name, Type, Config, CreatedDate, IsLocked ) VALUES ( @BucketName, 'filesystem', @sql, GETUTCDATE(), 0 )
COMMIT TRANSACTION

a. @BucketName: name of the bucket. For example, a bucket that is going to be used for all customers within the NFS instance might be named just 'FileSystem'.

Alternatively, a bucket that is going to be used for a specific customer might be named 'MyCustomer'.


b. @RootPath: the folder path for the bucket. The path should match the folder created in Step 1. NOTE: Notice the double slashes, they are required.

 

Related Articles:

Saving attachments outside the database

HowTo: Add a bucket to your NFS Server (This Article)

HowTo: Set the bucket for the NFS instance

HowTo: Set the bucket for a specific customer

Have more questions? Submit a request

Comments

Powered by Zendesk