[PR #1770] [MERGED] update: for plugin tencent_cos-0.0.3.difypkg【add new features and fix bugs】 #1845

Closed
opened 2026-02-22 18:09:36 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugins/pull/1770
Author: @sawyer-shi
Created: 12/21/2025
Status: Merged
Merged: 12/22/2025
Merged by: @crazywoola

Base: mainHead: main


📝 Commits (4)

  • 4c4b4d5 update: for plugin tencent_cos-0.0.3.difypkg【add new features and fix bugs】
  • 3cef539 Revert "update: for plugin tencent_cos-0.0.3.difypkg【add new features and fix bugs】"
  • 15d8c3e Merge remote-tracking branch 'origin/main'
  • c856b95 update: for plugin tencent_cos-0.0.3.difypkg【add new features and fix bugs】

📊 Changes

1 file changed (+0 additions, -0 deletions)

View changed files

sawyer-shi/tencent_cos/tencent_cos-0.0.3.difypkg (+0 -0)

📄 Description

Tencent Cloud COS Plugin

A powerful Dify plugin providing seamless integration with Tencent Cloud Object Storage (COS). Enables direct file uploads to Tencent Cloud COS and efficient file retrieval using URLs, with rich configuration options.

Version Information

  • Current Version: v0.0.3
  • Release Date: 2025-12-21
  • Last Updated: 2025-12-21
  • Compatibility: Dify Plugin Framework
  • Python Version: 3.12

Version History

  • v0.0.3 (2025-12-21): Added batch file download and public file download capabilities
  • v0.0.2 (2025-09-30): Added multi-file upload functionality with enhanced directory and filename options
  • v0.0.1 (2025-09-30): Initial release with file upload and retrieval capabilities, support for multiple directory structures and filename modes

Quick Start

  1. Download the tencent_cos plugin from the Dify marketplace
  2. Configure Tencent Cloud COS authorization information
  3. After completing the above configuration, you can immediately use the plugin

Core Features

File Upload to COS

  • Direct File Upload: Upload any file type directly to Tencent Cloud COS
  • Flexible Directory Structure: Multiple storage directory organization options
    • Flat structure (no_subdirectory)
    • Hierarchical date structure (yyyy_mm_dd_hierarchy)
    • Combined date structure (yyyy_mm_dd_combined)
  • Filename Customization: Control how filenames are stored in COS
    • Use original filename
    • Append timestamp to original filename
  • Source File Tracking: Automatically captures and returns the original filename
  • Smart Extension Detection: Automatically determine file extensions based on content type

File Retrieval by URL

  • Direct Content Access: Retrieve file content directly using COS URLs
  • Cross-Region Support: Works with all Tencent Cloud COS regions worldwide

Batch File Download

  • Multiple URLs Support: Download multiple files using a list of URLs separated by semicolons
  • Progress Tracking: Real-time status updates for each file download
  • Comprehensive Statistics: Summary of total files, successful downloads, and total size

Public File Download

  • No Authentication Required: Download public files from any platform without API keys
  • Universal Compatibility: Works with any publicly accessible file URL
  • Smart Filename Detection: Automatically extracts filenames from URLs or headers

Technical Advantages

  • Secure Authentication: Robust credential handling with support for HTTPS
  • Efficient Storage Management: Intelligent file organization options
  • Comprehensive Error Handling: Detailed error messages and status reporting
  • Multiple File Type Support: Works with all common file formats
  • Rich Parameter Configuration: Extensive options for customized workflows
  • Source File Tracking: Preserves original filename information

Requirements

  • Python 3.12
  • Tencent Cloud COS account with valid SecretId and SecretKey credentials
  • Dify Platform access
  • Required Python packages (installed via requirements.txt)

Installation & Configuration

  1. Install the required dependencies:

    pip install -r requirements.txt
    
  2. Configure the plugin in Dify with the following parameters:

    • Region: Your Tencent Cloud COS region (e.g., ap-beijing)
    • Bucket Name: Your COS bucket name
    • SecretId: Your Tencent Cloud SecretId
    • SecretKey: Your Tencent Cloud SecretKey

Usage

The plugin provides five powerful tools for interacting with Tencent Cloud COS:

1. Upload File to COS (upload_file)

Dedicated tool for uploading files to Tencent Cloud COS.

  • Parameters:
    • file: The local file to upload (required)
    • directory: First-level directory under the bucket (required)
    • directory_mode: Optional directory structure mode (default: no_subdirectory)
      • no_subdirectory: Store directly in specified directory
      • yyyy_mm_dd_hierarchy: Store in date-based hierarchical structure
      • yyyy_mm_dd_combined: Store in combined date directory
    • filename: Optional custom filename for COS storage
    • filename_mode: Optional filename composition mode (default: filename)
      • filename: Use original filename
      • filename_timestamp: Use original filename plus timestamp

2. Multi-Upload Files to COS (multi_upload_files)

Dedicated tool for uploading multiple files to Tencent Cloud COS.

  • Parameters:
    • files: The local files to upload (required, maximum 10 files)
    • directory: First-level directory under the bucket (required)
    • directory_mode: Optional directory structure mode (default: no_subdirectory)
      • no_subdirectory: Store directly in specified directory
      • yyyy_mm_dd_hierarchy: Store in date-based hierarchical structure
      • yyyy_mm_dd_combined: Store in combined date directory
    • filename_mode: Optional filename composition mode (default: filename)
      • filename: Use original filename
      • filename_timestamp: Use original filename plus timestamp

3. Get File by URL (get_file_by_url)

Dedicated tool for retrieving files from Tencent Cloud COS using URLs.

  • Parameters:
    • file_url: The URL of the file in Tencent Cloud COS

4. Batch Download Files by URLs (get_files_by_urls)

Dedicated tool for batch downloading multiple files from Tencent Cloud COS.

  • Parameters:
    • file_urls: Multiple URLs of files in Tencent Cloud COS, separated by semicolon (;)

5. Download Public File by URL (get_public_file_by_url)

Dedicated tool for downloading public files from any platform without authentication.

  • Parameters:
    • file_url: The URL of the public file that can be accessed without authentication

Examples

Upload File

upload-001

Batch Upload Files

upload-002

Get File by URL

download-001 download-002

Notes

  • Ensure your COS bucket has the correct permissions configured
  • The plugin requires valid Tencent Cloud credentials with appropriate COS access permissions
  • For very large files, consider using multipart upload functionality (not currently implemented)

Developer Information

  • Author: https://github.com/sawyer-shi
  • Email: sawyer36@foxmail.com
  • License: MIT License
  • Source Code: https://github.com/sawyer-shi/dify-plugins-tencent_cos
  • Support: Through Dify platform and GitHub Issues

Ready to seamlessly integrate with Tencent Cloud COS?

Plugin Submission Form

1. Metadata

  • Plugin Author:
  • Plugin Name:
  • Repository URL:

2. Submission Type

  • New plugin submission
  • Version update for existing plugin

3. Description

4. Checklist

  • I have read and followed the Publish to Dify Marketplace guidelines
  • I have read and comply with the Plugin Developer Agreement
  • I confirm my plugin works properly on both Dify Community Edition and Cloud Version
  • I confirm my plugin has been thoroughly tested for completeness and functionality
  • My plugin brings new value to Dify

5. Documentation Checklist

Please confirm that your plugin README includes all necessary information:

  • Step-by-step setup instructions
  • Detailed usage instructions
  • All required APIs and credentials are clearly listed
  • Connection requirements and configuration details
  • Link to the repository for the plugin source code

6. Privacy Protection Information

Based on Dify Plugin Privacy Protection Guidelines:

Data Collection

Privacy Policy

  • I confirm that I have prepared and included a privacy policy in my plugin package based on the Plugin Privacy Protection Guidelines

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugins/pull/1770 **Author:** [@sawyer-shi](https://github.com/sawyer-shi) **Created:** 12/21/2025 **Status:** ✅ Merged **Merged:** 12/22/2025 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (4) - [`4c4b4d5`](https://github.com/langgenius/dify-plugins/commit/4c4b4d592221bd168a90e6892429f83191c8c84a) update: for plugin tencent_cos-0.0.3.difypkg【add new features and fix bugs】 - [`3cef539`](https://github.com/langgenius/dify-plugins/commit/3cef5399b262dde216ccc2634a11037be0a2de2d) Revert "update: for plugin tencent_cos-0.0.3.difypkg【add new features and fix bugs】" - [`15d8c3e`](https://github.com/langgenius/dify-plugins/commit/15d8c3efc734a428ecbf4cf89fcd7be068e9b3ad) Merge remote-tracking branch 'origin/main' - [`c856b95`](https://github.com/langgenius/dify-plugins/commit/c856b954cfe2fbbe0f33164be71549c151af7c0f) update: for plugin tencent_cos-0.0.3.difypkg【add new features and fix bugs】 ### 📊 Changes **1 file changed** (+0 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `sawyer-shi/tencent_cos/tencent_cos-0.0.3.difypkg` (+0 -0) </details> ### 📄 Description # Tencent Cloud COS Plugin A powerful Dify plugin providing seamless integration with Tencent Cloud Object Storage (COS). Enables direct file uploads to Tencent Cloud COS and efficient file retrieval using URLs, with rich configuration options. ### Version Information - **Current Version**: v0.0.3 - **Release Date**: 2025-12-21 - **Last Updated**: 2025-12-21 - **Compatibility**: Dify Plugin Framework - **Python Version**: 3.12 #### Version History - **v0.0.3** (2025-12-21): Added batch file download and public file download capabilities - **v0.0.2** (2025-09-30): Added multi-file upload functionality with enhanced directory and filename options - **v0.0.1** (2025-09-30): Initial release with file upload and retrieval capabilities, support for multiple directory structures and filename modes ### Quick Start 1. Download the tencent_cos plugin from the Dify marketplace 2. Configure Tencent Cloud COS authorization information 3. After completing the above configuration, you can immediately use the plugin ### Core Features #### File Upload to COS - **Direct File Upload**: Upload any file type directly to Tencent Cloud COS - **Flexible Directory Structure**: Multiple storage directory organization options - Flat structure (no_subdirectory) - Hierarchical date structure (yyyy_mm_dd_hierarchy) - Combined date structure (yyyy_mm_dd_combined) - **Filename Customization**: Control how filenames are stored in COS - Use original filename - Append timestamp to original filename - **Source File Tracking**: Automatically captures and returns the original filename - **Smart Extension Detection**: Automatically determine file extensions based on content type #### File Retrieval by URL - **Direct Content Access**: Retrieve file content directly using COS URLs - **Cross-Region Support**: Works with all Tencent Cloud COS regions worldwide #### Batch File Download - **Multiple URLs Support**: Download multiple files using a list of URLs separated by semicolons - **Progress Tracking**: Real-time status updates for each file download - **Comprehensive Statistics**: Summary of total files, successful downloads, and total size #### Public File Download - **No Authentication Required**: Download public files from any platform without API keys - **Universal Compatibility**: Works with any publicly accessible file URL - **Smart Filename Detection**: Automatically extracts filenames from URLs or headers ### Technical Advantages - **Secure Authentication**: Robust credential handling with support for HTTPS - **Efficient Storage Management**: Intelligent file organization options - **Comprehensive Error Handling**: Detailed error messages and status reporting - **Multiple File Type Support**: Works with all common file formats - **Rich Parameter Configuration**: Extensive options for customized workflows - **Source File Tracking**: Preserves original filename information ### Requirements - Python 3.12 - Tencent Cloud COS account with valid SecretId and SecretKey credentials - Dify Platform access - Required Python packages (installed via requirements.txt) ### Installation & Configuration 1. Install the required dependencies: ```bash pip install -r requirements.txt ``` 2. Configure the plugin in Dify with the following parameters: - **Region**: Your Tencent Cloud COS region (e.g., ap-beijing) - **Bucket Name**: Your COS bucket name - **SecretId**: Your Tencent Cloud SecretId - **SecretKey**: Your Tencent Cloud SecretKey ### Usage The plugin provides five powerful tools for interacting with Tencent Cloud COS: #### 1. Upload File to COS (upload_file) Dedicated tool for uploading files to Tencent Cloud COS. - **Parameters**: - `file`: The local file to upload (required) - `directory`: First-level directory under the bucket (required) - `directory_mode`: Optional directory structure mode (default: `no_subdirectory`) - `no_subdirectory`: Store directly in specified directory - `yyyy_mm_dd_hierarchy`: Store in date-based hierarchical structure - `yyyy_mm_dd_combined`: Store in combined date directory - `filename`: Optional custom filename for COS storage - `filename_mode`: Optional filename composition mode (default: `filename`) - `filename`: Use original filename - `filename_timestamp`: Use original filename plus timestamp #### 2. Multi-Upload Files to COS (multi_upload_files) Dedicated tool for uploading multiple files to Tencent Cloud COS. - **Parameters**: - `files`: The local files to upload (required, maximum 10 files) - `directory`: First-level directory under the bucket (required) - `directory_mode`: Optional directory structure mode (default: `no_subdirectory`) - `no_subdirectory`: Store directly in specified directory - `yyyy_mm_dd_hierarchy`: Store in date-based hierarchical structure - `yyyy_mm_dd_combined`: Store in combined date directory - `filename_mode`: Optional filename composition mode (default: `filename`) - `filename`: Use original filename - `filename_timestamp`: Use original filename plus timestamp #### 3. Get File by URL (get_file_by_url) Dedicated tool for retrieving files from Tencent Cloud COS using URLs. - **Parameters**: - `file_url`: The URL of the file in Tencent Cloud COS #### 4. Batch Download Files by URLs (get_files_by_urls) Dedicated tool for batch downloading multiple files from Tencent Cloud COS. - **Parameters**: - `file_urls`: Multiple URLs of files in Tencent Cloud COS, separated by semicolon (;) #### 5. Download Public File by URL (get_public_file_by_url) Dedicated tool for downloading public files from any platform without authentication. - **Parameters**: - `file_url`: The URL of the public file that can be accessed without authentication ### Examples #### Upload File <img width="2026" height="523" alt="upload-001" src="https://github.com/user-attachments/assets/ac7a1539-e7fc-419d-a9b0-273cec761a7d" /> #### Batch Upload Files <img width="1978" height="954" alt="upload-002" src="https://github.com/user-attachments/assets/ab5755e1-c6df-4b63-8525-a52b1ef1df84" /> #### Get File by URL <img width="2225" height="487" alt="download-001" src="https://github.com/user-attachments/assets/c4aab17f-5294-4107-8799-f85c3ef1f7cd" /> <img width="2222" height="544" alt="download-002" src="https://github.com/user-attachments/assets/12fbc8ec-4249-46b4-8680-e10761510774" /> ### Notes - Ensure your COS bucket has the correct permissions configured - The plugin requires valid Tencent Cloud credentials with appropriate COS access permissions - For very large files, consider using multipart upload functionality (not currently implemented) ### Developer Information - **Author**: `https://github.com/sawyer-shi` - **Email**: sawyer36@foxmail.com - **License**: MIT License - **Source Code**: `https://github.com/sawyer-shi/dify-plugins-tencent_cos` - **Support**: Through Dify platform and GitHub Issues --- **Ready to seamlessly integrate with Tencent Cloud COS?** # Plugin Submission Form ## 1. Metadata <!-- Please provide the following metadata of your plugin to make it easier for the reviewer to check the changes. - Plugin Author : The author of the plugin which is defined in your manifest.yaml - Plugin Name : The name of the plugin which is defined in your manifest.yaml - Repository URL: The URL of the repository where the source code of your plugin is hosted --> - **Plugin Author**: - **Plugin Name**: - **Repository URL**: ## 2. Submission Type - [ ] New plugin submission - [x] Version update for existing plugin ## 3. Description <!-- Please briefly describe the purpose of the new plugin or the updates made to the existing plugin --> ## 4. Checklist - [x] I have read and followed the Publish to Dify Marketplace guidelines - [x] I have read and comply with the Plugin Developer Agreement - [x] I confirm my plugin works properly on both Dify Community Edition and Cloud Version - [x] I confirm my plugin has been thoroughly tested for completeness and functionality - [x] My plugin brings new value to Dify ## 5. Documentation Checklist Please confirm that your plugin README includes all necessary information: - [x] Step-by-step setup instructions - [x] Detailed usage instructions - [x] All required APIs and credentials are clearly listed - [x] Connection requirements and configuration details - [x] Link to the repository for the plugin source code ## 6. Privacy Protection Information Based on Dify Plugin Privacy Protection [Guidelines](https://docs.dify.ai/plugins/publish-plugins/publish-to-dify-marketplace/plugin-privacy-protection-guidelines): ### Data Collection <!-- Does your plugin collect any user personal data? If yes, please list what types of user personal data are being collected according to the Plugin Privacy Protection Guidelines (for example: Email address, IP address, Age, etc) --> ### Privacy Policy - [x] I confirm that I have prepared and included a privacy policy in my plugin package based on the Plugin Privacy Protection Guidelines --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:09:36 -05:00
yindo closed this issue 2026-02-22 18:09:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugins#1845