-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
domain: channeldomain: configpriority: lowtype: enhancementNew feature or requestNew feature or request
Description
🎯 The Goal / Use Case
Refactor Feishu channel file download mechanism with improved organization and intelligent deduplication.
💡 Proposed Solution
Directory Structure Simplification:
- Changed from hash-based paths to human-readable structure:
{download_dir}/{year}/{month}/{filename} - Files are now organized by time (e.g.,
downloads/2026/03/report.pdf) - Preserves original filenames with comprehensive character sanitization
Intelligent Deduplication:
- Smart hash-based deduplication only checks when same-month + same-filename conflicts occur
- Same hash + size → reuse existing file (avoid duplicate downloads)
- Different hash/size → auto-generate suffix (
file-1.pdf,file-2.pdf)
Lightweight Directory Indexing:
- Each directory has its own
.feishu_index.jsonfor metadata tracking - Records file hash, size, Feishu file_key, message_id, and download time
- Enables file re-downloading if local files are lost
- Independent indexes minimize impact of corruption
Configurable Read-Only Protection:
- New config field
download_readonly_disable(default:false) - When disabled (default), downloaded files are set to read-only (0o444) to prevent accidental modification
- Users can enable editing by setting
download_readonly_disable: true
🛠 Potential Implementation (Optional)
I already make it done, and I'll make a PR
🚦 Impact & Roadmap Alignment
- This is a Core Feature
- This is a Nice-to-Have / Enhancement
- This aligns with the current Roadmap
🔄 Alternatives Considered
💬 Additional Context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
domain: channeldomain: configpriority: lowtype: enhancementNew feature or requestNew feature or request