
GLFzr/dsh-file-upload
51Last commit Aug 15, 2026
dsh-file-upload DSH plugin
This plugin replaces the original image-only attachment channel in DSH Web GUI, allowing any file type (PDF, ZIP, Excel, code, images, etc.) to be dragged and dropped. Files are uploaded to a local transit directory, and a blue file chip is inserted into the input box for the agent to read. It supports zero-upload for Chromium-based browsers via native file paths, and uses chunked upload with integrity checks for other cases.
How to install the dsh-file-upload DSH plugin
dsh plugin --profile web add ./plugins/file-uploadCopying does not run this command. Review the repository and version before installing the dsh-file-upload DSH plugin.
dsh-file-upload DSH plugin data source
dsh-file-upload DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-file-upload DSH plugin can do
- Drag-and-drop any file type from anywhere in the page
- Zero-upload direct file reference on Chromium browsers (Edge/Chrome)
- File chip (blue pill) inserted into the composer as an indivisible unit
- Two-level deduplication (fast path by name+size+modification time, then sha256)
- Chunked upload up to 512MB with base64 integrity checks
- Sidebar trash icon for managing transit directory (clean redundant copies, by size, or empty all)
Where the dsh-file-upload DSH plugin fits
- Upload large PDF documents for AI analysis in DSH conversations
- Drag and drop ZIP archives of code or data for agent processing
- Share Excel spreadsheets or images alongside text prompts
- Upload multiple files at once (no 16-file limit) for batch processing
- Use Chromium browsers to instantly reference local files without uploading
Who the dsh-file-upload DSH plugin is for
- DSH Web GUI users who need to upload non-image files (PDF, code, zip, etc.) to the AI agent
- Developers and power users who frequently share local files with DSH agents
dsh-file-upload DSH plugin limitations
- Single-file upload holds full base64 chunks in memory (512MB file ≈ 683MB string); concurrent large files consume significant RAM
- Zero-upload path (Chromium) relies on `webkitGetAsEntry()` and may fail with OneDrive placeholders or virtual filesystems
- Cleanup of transit directory is irreversible; historical sessions referencing those files will break
- Requires DSH Web GUI environment; not applicable to CLI-based Hermes/Codex
- Only works in browsers that support file drag-and-drop (modern browsers)
dsh-file-upload DSH plugin: from the repository README
Quoted from the GLFzr/dsh-file-upload README, the upstream source of the dsh-file-upload DSH plugin. Copyright remains with the original authors.
把 DSH Web GUI 原版**只支持图片**的附件通道,扩展为**任意文件上传**:拖入任意文件(PDF、3MF、ZIP、Excel、代码、图片……)→ 文件上传/引用到本机中转目录 → 输入框出现一个**蓝色文件 chip** → agent 可以直接读取该文件。 > **定位说明(v2.0.0 起)**:本插件的本质是**文件上传功能**,不是"路径展示"。路径只是内部机制——agent 读取文件必须依赖磁盘路径,浏览器又拿不到(见下文"为什么必须上传"),所以插件负责把文件物化到本机、并把路径交给 agent。用户界面不再出现任何路径概念:chip 只显示文件名,用户只需知道"文件上传好了,agent 能读了"。 本仓库是**持久化 profile 插件**(`dsh.bundle` + `dsh.client` 双声明):按官方方式安装一次,**DSH 重启后自动生效**。 ## 功能特性 - 🖱️ **页面任意位置拖入任意文件**(多文件、图片均可);拖拽时全屏提示"松开以接收文件" - 📦 **任意文件类型**:原版"仅图片"附件通道被完全静默接管,任何文件都可拖入 - 📍 **本机文件零上传直引**:Chromium(Edge/Chrome)拖拽会经 entry API 暴露源文件路径——直接引用,**零上传、零复制**(你电脑里那份文件就是唯一的一份);仅当浏览器拿不到路径(如 Firefox)时才走上传中转 - 🔵 文件以**一个整体 chip** 插入输入框:蓝色文字(**只显示文件名+格式**)、不可被局部删改(Backspace/Delete 一次删除整个引用) - 📐 **篮筐宽度随文件名自适应**:插入时用 composer 真实字体实测文件名宽度,pill 精确贴合(误差 <1 个字符) - 🙈 **内部细节全部隐藏**:`.b64` 后缀、`_1/_2` 重名序号、中转目录路径——用户界面永远看不到;提交给 agent 的才是完整真实路径 - ♻️ **两级去重(先查后传,防误复用)**:`begin` 快路径命中条件 = 同名 + 同大小 + **manifest 登记的源文件修改时间与本次拖入一致**——重复拖同一文件仍**秒回**(零上传);但**编辑过且字节数没变的文件绝不误复用**(v2.1.0 起,新/旧文件首次拖入都先完整上传,由 `end` 的 sha256 逐字节比对裁决:内容相同复用旧路径,内容不同落 `_1` 副本) - 📇 **中转目录清单(manifest)**:插件把每个自己写入的文件登记到 `~/.dsh-dropbox/.dsh-manifest.json`(原名、源修改时间、sha256、是否自动编号副本)——清理面板的"冗余副本"标记只认清单,**不会把 `not
Read the full READMERepository license: MIT
dsh-file-upload DSH plugin questions
Why can't the agent directly read my local file from the browser?
Browsers are sandboxed and JavaScript cannot access the local file system path for security reasons. The agent can only read files via disk paths. This plugin must first upload the file to a local transit directory (or reference the original path on Chromium) so the agent can access it. This is a fundamental browser limitation, not a flaw of this plugin.
Why does the plugin upload files even when I drag from my local computer?
On most browsers (except Chromium-based ones), the drag event only provides a memory File object, not the disk path. The plugin must upload the file content to the transit directory to create a disk path for the agent. On Chromium (Edge/Chrome), the plugin can extract the original file path via `webkitGetAsEntry()` and skip the upload entirely (zero-upload).
What happens if I drag the same file multiple times?
The plugin uses two-level deduplication. First, it checks if a file with the same name, size, and last modification time already exists in the manifest. If so, it reuses the existing path instantly (zero upload). If the content differs (e.g., you edited the file but size didn't change), it uploads fully and compares sha256; if content matches, the old path is reused; otherwise a `_1` copy is created.
How do I clean up the uploaded files in the transit directory?
Click the trash icon in the sidebar (above the settings icon). A floating panel shows the file list, allows you to delete redundant `_N` copies, delete files larger than a threshold, or empty everything. WARNING: Cleaning is irreversible and will break historical sessions that reference those files. Always confirm before proceeding.
What is the `.b64` file extension for some uploaded files?
When the plugin falls back to upload (not zero-upload), binary files (PDF, ZIP, images, etc.) are saved as base64 text with a `.b64` suffix. This ensures the binary data can pass through JSON/text channels without corruption. The agent must decode the base64 before using the file (e.g., `base64.b64decode()` in Python). Text files (`.md`, `.txt`, `.json`) are saved without `.b64`. The chip in the UI only shows the original filename, never the `.b64` suffix.