Skip to content

Repository files navigation

S3 Storage Dify Plugin

Author: king Version: 0.0.3 Type: tool

S3-compatible storage tool plugin for Dify self-hosted v1.15. It supports:

  • upload: upload generated text content or a Dify file to S3.
  • download: download an S3 object and return it as a Dify blob/file output.
  • list: list files under a prefix before the graph ends.

This matches the workflow pattern where an Agent asynchronously writes generated artifacts to a known S3 prefix, then the workflow lists that prefix and downloads selected files as final outputs.

Provider Configuration

Configure these fields in Dify plugin provider settings:

  • Endpoint: S3-compatible endpoint, for example http://192.168.122.193:8334
  • Access Key
  • Secret Key
  • Bucket Name
  • Region: optional, defaults to us-east-1

The plugin uses S3 path-style addressing and S3 v4 signatures, which is the safest default for self-hosted S3-compatible services.

Credential validation checks the full workflow permission set against the configured bucket. It lists a probe prefix, writes a temporary object, reads it back, verifies the content, and deletes it. The temporary object key is under .dify-s3-storage-permission-check/.

Tool Parameters

  • operation: upload, download, or list
  • path: object key for upload/download, for example outputs/{{session_id}}/result.csv
  • prefix: object prefix for list, for example outputs/{{session_id}}/
  • content: text payload for upload when no file is provided
  • file: Dify file object for upload
  • content_type: optional MIME type for upload
  • max_keys: maximum objects returned by list, capped at 1000

Local Build

dify plugin package . -o s3-storage-0.0.3.difypkg

Local Debug

Copy .env.example to .env, fill in the remote debug URL/key from Dify, then run:

python -m main

Release Automation

.github/workflows/plugin-publish.yml builds the plugin on push and pull request. When you push a tag such as v0.0.3, it also uploads the generated .difypkg to the GitHub Release.

About

S3-compatible upload, download, and list tool plugin for Dify self-hosted workflows.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages