|
| 1 | +# Qiniu Storage Tools Plugin |
| 2 | + |
| 3 | +Official Qiniu Cloud object storage tools plugin for Dify, providing comprehensive cloud storage management capabilities. |
| 4 | + |
| 5 | +## 📦 Plugin Information |
| 6 | + |
| 7 | +- **Plugin Name**: storage-tools |
| 8 | +- **Author**: Qiniu Cloud |
| 9 | +- **License**: MIT License |
| 10 | + |
| 11 | +## Features |
| 12 | + |
| 13 | +### 📁 Object Storage Tools |
| 14 | + |
| 15 | +Provides complete Qiniu Cloud storage management functionality: |
| 16 | + |
| 17 | +#### 1. List Buckets |
| 18 | + |
| 19 | +View all storage buckets (Bucket) under your account. |
| 20 | + |
| 21 | +- **Functionality**: Get all available storage buckets |
| 22 | +- **Returns**: List of bucket names |
| 23 | +- **Use case**: Understand your storage resource distribution |
| 24 | + |
| 25 | +#### 2. File Upload |
| 26 | + |
| 27 | +Upload files to a specified storage bucket. |
| 28 | + |
| 29 | +- **Supported Features**: |
| 30 | + - Specify target storage bucket |
| 31 | + - Custom file prefix/path |
| 32 | + - Set custom domain |
| 33 | + - Return file access link |
| 34 | +- **Use case**: Store application-generated files, images, and other resources |
| 35 | + |
| 36 | +#### 3. List Files |
| 37 | + |
| 38 | +View the file list in a storage bucket. |
| 39 | + |
| 40 | +- **Supported Features**: |
| 41 | + - Filter files by prefix |
| 42 | + - Paginated query |
| 43 | + - Limit number of results |
| 44 | +- **Use case**: Browse and manage files in storage buckets |
| 45 | + |
| 46 | +#### 4. Get File Content |
| 47 | + |
| 48 | +Get access links or content for private files. |
| 49 | + |
| 50 | +- **Supported Features**: |
| 51 | + - Generate signed access links |
| 52 | + - Support private bucket file access |
| 53 | + - Set link expiration time |
| 54 | +- **Use case**: Securely access and share private files |
| 55 | + |
| 56 | +## Installation |
| 57 | + |
| 58 | +### Install in Dify |
| 59 | + |
| 60 | +1. Open Dify workspace |
| 61 | +2. Go to "Plugins" management page |
| 62 | +3. Select "Install Plugin" |
| 63 | +4. Choose one of the following installation methods: |
| 64 | + |
| 65 | +#### Method 1: Install from GitHub Repository (Recommended) |
| 66 | + |
| 67 | +``` |
| 68 | +https://github.com/qiniu/dify-plugin |
| 69 | +``` |
| 70 | + |
| 71 | +#### Method 2: Install from Official Marketplace |
| 72 | + |
| 73 | +Search for "Qiniu Storage Tools" in the plugin marketplace |
| 74 | + |
| 75 | +### Configure Plugin |
| 76 | + |
| 77 | +1. After successful installation, find "Qiniu Storage Tools" in the plugin list |
| 78 | +2. Click the "Configure" button |
| 79 | +3. Fill in the following information: |
| 80 | + |
| 81 | + - **Access Key**: Your Qiniu Cloud Access Key (required) |
| 82 | + - **Secret Key**: Your Qiniu Cloud Secret Key (required) |
| 83 | + |
| 84 | +4. Click "Save" to complete configuration |
| 85 | + |
| 86 | +### Get Credentials |
| 87 | + |
| 88 | +1. Visit [Qiniu Cloud Console](https://portal.qiniu.com/user/key) |
| 89 | +2. Log in to your Qiniu Cloud account |
| 90 | +3. View or create your Access Key and Secret Key in the "Key Management" page |
| 91 | + |
| 92 | +## Usage Example |
| 93 | + |
| 94 | +After configuration, you can use Qiniu Cloud storage tools in Dify applications: |
| 95 | + |
| 96 | +### Use in Workflow |
| 97 | + |
| 98 | +1. In the workflow orchestration page, add a "Tool" node |
| 99 | +2. Select the "Qiniu Cloud Storage" toolset |
| 100 | +3. Choose the tool you need (List Buckets, File Upload, etc.) |
| 101 | +4. Configure tool parameters |
| 102 | +5. Connect to other nodes to build a complete workflow |
| 103 | + |
| 104 | +### Use in Agent |
| 105 | + |
| 106 | +1. Create or edit an Agent application |
| 107 | +2. In the "Tools" configuration section, enable "Qiniu Cloud Storage" |
| 108 | +3. Select specific tools to use |
| 109 | +4. The Agent can now call storage tools as needed |
| 110 | + |
| 111 | +## Tool Parameter Descriptions |
| 112 | + |
| 113 | +### File Upload |
| 114 | + |
| 115 | +- **bucket**: (Required) Target storage bucket name |
| 116 | +- **file**: (Required) File content to upload (Base64 encoded) |
| 117 | +- **key_prefix**: (Optional) File storage path prefix |
| 118 | +- **domain**: (Optional) Custom access domain |
| 119 | + |
| 120 | +### List Files |
| 121 | + |
| 122 | +- **bucket**: (Required) Target storage bucket name |
| 123 | +- **prefix**: (Optional) File prefix filter |
| 124 | +- **marker**: (Optional) Pagination marker |
| 125 | +- **limit**: (Optional) Maximum number of results (default: 100) |
| 126 | + |
| 127 | +### Get File Content |
| 128 | + |
| 129 | +- **bucket**: (Required) Target storage bucket name |
| 130 | +- **key**: (Required) File key |
| 131 | +- **domain**: (Optional) Custom access domain |
| 132 | +- **expires**: (Optional) Link expiration time in seconds (default: 3600) |
| 133 | + |
| 134 | +## Technical Specifications |
| 135 | + |
| 136 | +- **Architecture Support**: AMD64, ARM64 |
| 137 | +- **Runtime Environment**: Python 3.12 |
| 138 | +- **Memory Requirements**: 256 MB |
| 139 | +- **Dependencies**: |
| 140 | + - dify_plugin >= 0.3.0, < 0.5.0 |
| 141 | + - qiniu >= 7.13.0 |
| 142 | + |
| 143 | +## Related Plugins |
| 144 | + |
| 145 | +For Qiniu Cloud AI model inference functionality, please also install: |
| 146 | + |
| 147 | +- **ai-models-provider**: Qiniu AI Models Provider Plugin |
| 148 | + |
| 149 | +## Support and Feedback |
| 150 | + |
| 151 | +- **Issue Reporting**: [GitHub Issues](https://github.com/qiniu/dify-plugin/issues) |
| 152 | +- **Documentation**: [readme/README.md](readme/README.md) |
| 153 | +- **Chinese Documentation**: [readme/README_zh_Hans.md](readme/README_zh_Hans.md) |
0 commit comments