langgenius / dify-docs

The open-source repo for docs.dify.ai
Creative Commons Attribution 4.0 International
150 stars 135 forks source link

add volcengine tos storage to support #256

Closed yaoice closed 2 weeks ago

dosubot[bot] commented 2 weeks ago

To add Volcengine TOS storage support, you can follow the existing pattern for integrating new storage services. Here are the steps:

  1. Define Environment Variables:

    • Add new environment variables for Volcengine TOS similar to the existing ones for S3, Azure Blob, and Aliyun OSS.
  2. Update Configuration:

    • Modify the configuration section to include Volcengine TOS as a storage type.
  3. Implement Storage Integration:

    • Implement the necessary code to handle file operations (upload, download, delete) using Volcengine TOS SDK.

Example Configuration

Add the following environment variables for Volcengine TOS:

- TOS_ENDPOINT: TOS endpoint address
- TOS_BUCKET_NAME: TOS bucket name
- TOS_ACCESS_KEY: TOS Access Key
- TOS_SECRET_KEY: TOS Secret Key
- TOS_REGION: TOS region information

Update Configuration Section

Modify the configuration section to include Volcengine TOS:

- STORAGE_TYPE

  Type of storage facility

  - local (default)
  - s3
  - azure-blob
  - aliyun-oss
  - tos  # Add this line for Volcengine TOS

- TOS_ENDPOINT: TOS endpoint address
- TOS_BUCKET_NAME: TOS bucket name
- TOS_ACCESS_KEY: TOS Access Key
- TOS_SECRET_KEY: TOS Secret Key
- TOS_REGION: TOS region information

Implement Storage Integration

Implement the necessary code to handle file operations using the Volcengine TOS SDK. Ensure you follow the same structure as the existing storage integrations.

For detailed steps on adding a new provider, refer to the Adding a New Provider guide [1][2].

This should help you integrate Volcengine TOS storage into the project.

To continue talking to Dosu, mention @dosu.