logologo
Get Started
Guide
Development
Plugins
API
English
简体中文
Get Started
Guide
Development
Plugins
API
English
简体中文
logologo
File Manager
Overview

Storage Engines

Overview
Local Storage
AWS S3
Alibaba Cloud OSS
Tencent Cloud COS
S3 Pro
File Collection
Attachment Field
Development
Previous PageOverview
Next PageLocal Storage

#Overview

#Introduction

Storage engines are used to save files to specific services, including local storage (saved to the server's hard drive), cloud storage, etc.

Before uploading any files, you need to configure a storage engine. The system automatically adds a local storage engine during installation, which can be used directly. You can also add new engines or edit the parameters of existing ones.

#Storage Engine Types

Currently, NocoBase has built-in support for the following engine types:

  • Local Storage
  • Amazon S3
  • Aliyun OSS
  • Tencent COS
  • S3 Pro

The system automatically adds a local storage engine during installation, which can be used directly. You can also add new engines or edit the parameters of existing ones.

#Common Parameters

In addition to the specific parameters for different engine types, the following are common parameters (using local storage as an example):

Example of file storage engine configuration

#Title

The name of the storage engine, for human identification.

#System Name

The system name of the storage engine, used for system identification. It must be unique within the system. If left blank, the system will automatically generate a random one.

#Public URL prefix

The prefix part of the publicly accessible URL for the file. It can be the base URL of a CDN, such as: "https://cdn.nocobase.com/app" (no trailing "/").

#Path

The relative path used when storing files. This part will also be automatically appended to the final URL during access. For example: "user/avatar" (no leading or trailing "/").

#File size limit

The size limit for files uploaded to this storage engine. Files exceeding this size cannot be uploaded. The system default limit is 20MB, and it can be adjusted up to a maximum of 1GB.

#File types

You can restrict the types of files that can be uploaded, using the MIME syntax. For example: image/* represents image files. Multiple types can be separated by commas, such as: image/*, application/pdf which allows image and PDF files.

#Default storage engine

When checked, this is set as the system's default storage engine. When an attachment field or file collection does not specify a storage engine, uploaded files will be saved to the default storage engine. The default storage engine cannot be deleted.

#Keep file when record is deleted

When checked, the uploaded file in the storage engine will be kept even when the data record in the attachment or file collection is deleted. By default, this is not checked, meaning the file in the storage engine will be deleted along with the record.

Tip

After a file is uploaded, the final access path is constructed by concatenating several parts:

<Public URL prefix>/<Path>/<Filename><Extension>

For example: https://cdn.nocobase.com/app/user/avatar/20240529115151.png.