GridFS

This stores files in a MongoDB GridFS instance. Redakt CMS offers GridFS integration through an optional NuGet package. This feature can only be used in combination with the MongoDB data store module. It is therefore not necessary to configure a connection string, since the same connection from the MongoDB cluster will be used.

Installation

Install the MongoDB package with the NuGet package manager or the Package Manager Console.

PM> Install-Package Redakt.Data.MongoDb

Register GridFS services in the ConfigureServices method in your project's Startup.cs file.

public void ConfigureServices(IServiceCollection services)
{
    // ... framework and other services here

    services.AddRedakt(this.Configuration, builder =>
    {
        builder.AddGridFsFileStore();
        // ... other Redakt services
    });
}

Configuration

The GridFS file store is configured through the appsettings.json file. Any configuration that is not included in the appsettings.json file will be set to its following default values.

{
    "Redakt": {
        "FileStore": {
            "GridFS": {
                "...": ""
            }
        }
    }
}