Nucleus .Net Core CMS

Google Cloud Storage File System Provider

The Google Cloud Storage extension is a File System Provider which allows you to use the Google Cloud Storage service with Nucleus.

Your Google Cloud Storage service is configured using the Google Cloud Console.

Setup: Google Cloud Storage

  1. In the Google Cloud Console, create a new project or select an existing one.
  2. Create a Google Cloud Storage service. In the Google cloud console, click "Cloud Storage" and foolow the prompts to create a bucket.
  3. Configure Permissions.
  • Click the menu button at the top left. Choose APIs and Services.
  • Click Credentials, then click "Create Credentials" and select "Create Service Account". Follow the prompts to create your service account.
    • In the permissions section, add the "Cloud Storage" / "Storage Folder Admin" permission.
    • Save, then select your service account
  • In Actions, select "manage keys", "Add key", then "Create new key". Create a key in JSON format. The Google cloud console will download a json key file.

Setup: Nucleus

The easiest way to set up the Nucleus Google Cloud Storage extension is during setup, using the Setup Wizard. If you use the Setup Wizard, you don't need to follow the steps below.

To use Google Cloud Storage, install the Google Cloud Storage extension, then add a configuration section for the Google Cloud Storage file system provider to the Nucleus:FileSystems:Providers section of your appSettings.{environment}.json file (normally appSettings.Production.json). You will need the credentials file that you downloaded earlier.

Refer to the Nucleus Configuration Reference for information on configuration files.

The provider type name for the Google Cloud Storage file system provider is Nucleus.Extensions.GoogleStorageCloudFileSystemProvider.FileSystemProvider,Nucleus.Extensions.GoogleStorageCloudFileSystemProvider.

Nucleus:FileSystems:Providers

{
  "Key": "Google",
  "Name": "Google",
  "ProviderType": "Nucleus.Extensions.GoogleStorageCloudFileSystemProvider.FileSystemProvider,Nucleus.Extensions.GoogleStorageCloudFileSystemProvider",
  "RootPath": "your-bucket-name",
  "ProjectId": "your-project-id",
  "CredentialsFile": "/path/to/credentials/file.json"
}

Setting Description
RootPath In most cases, you will set RootPath to the name of your bucket.
ProjectId The ID of your project in Google Cloud Console. You can view your project IDs by clicking the button to the right of the "Google Cloud" logo at the top left of the page.
CredentialsFile The path to your service account credentials file. This should be stored in a location that your web server can access, but which cannot be accessed by end users.

Limitations and Features:

  • In the Google Cloud Storage service, files are stored within Buckets. You must create a bucket and set its properties in the Google Cloud Console. You can't create or change buckets from Nucleus, only the files and folders within the bucket.
  • The Google Cloud Storage service does not support folder or file rename operations.