亚马逊 S3 提供商
🌐 Amazon S3 provider
Page summary:
@strapi/provider-upload-aws-s3包允许你将媒体库资源存储在 Amazon S3 或任何兼容 S3 的服务上(Cloudflare R2、Scaleway、MinIO、Tigris 等)。本页介绍了提供商配置、所需的 AWS 设置(IAM、CORS、中间件),以及扩展选项,比如加密、校验和和私有桶的签名 URL。🌐 The
@strapi/provider-upload-aws-s3package lets you store Media Library assets on Amazon S3 or any S3-compatible service (Cloudflare R2, Scaleway, MinIO, Tigris, etc.). This page covers provider configuration, required AWS setup (IAM, CORS, middleware), and extended options such as encryption, checksums, and signed URLs for private buckets.
媒体库 功能由一个名为 Upload 的后端服务器包提供支持,该包利用了提供程序的使用。
🌐 The Media Library feature is powered by a back-end server package called Upload which leverages the use of providers.
Strapi 为媒体库维护了 3 个提供者。本页面关于 Amazon S3 提供者的安装和配置。有关其他提供者,请参阅 媒体库页面 中的列表。
🌐 Strapi maintains 3 providers for the Media Library. The present page is about the Amazon S3 provider installation and configuration. For other providers, please refer to the list in the Media Library page.
安装
🌐 Installation
要安装官方 Strapi 维护的 AWS S3 提供程序,请在终端中运行以下命令:
🌐 To install the official Strapi-maintained AWS S3 provider, run the following command in a terminal:
- Yarn
- NPM
yarn add @strapi/provider-upload-aws-s3
npm install @strapi/provider-upload-aws-s3 --save
配置
🌐 Configuration
提供程序配置在 “/config/plugins” 文件 中定义。如果该文件不存在,请先创建它。使用每个环境不同的提供程序时,请在 /config/env/${yourEnvironment}/plugins.js|ts 中指定正确的配置(参见 环境