Introduction¶
In DeepSeek Harness WebUI, the Agent has a fairly mature workflow for handling images, but developers often need to pass code snippets, configuration files, or documents to the Agent for analysis. In existing solutions, dynamic plugins depend on session state and become invalid after process restart; meanwhile, the built-in image upload function cannot cover regular files. The dsh-chatfile plugin solves this pain point. It allows arbitrary files to be persistently saved to the uploads/ directory in the session workspace, and automatically inserts a path reference into the input box for the Agent to read directly.
Plugin Overview¶
dsh-chatfile is a DeepSeek Harness WebUI plugin. It is maintained by sooya7 and released under the MIT license. Its core function is to provide file upload capability in the chat interface, supporting drag-and-drop and button selection. Uploaded files are served for secure download access through random-token routing.
Core Features¶
The plugin includes the following capabilities:
- Drag-and-drop and selection upload: Supports dragging arbitrary files to any location on the page and releasing them, or clicking the 📎 button on the input toolbar to select multiple files.
- Upload status feedback: Above the input box displays upload progress for each file (uploading/success/failure). After success, files can be downloaded or removed.
- Automatic path reference: After upload completes, text like
[上传文件] uploads/xxx.pdf(名称,大小)is automatically appended to the input box. Once the Agent receives this instruction, it can use file tools to read the contents at that path. - Image compatibility: Drag-and-drop operations for pure images still go through DSH’s built-in image processing workflow, without interference.
- Secure download mechanism: File download URLs are generated with unguessable random tokens, and file name, size, and type are validated on the Host side to prevent risks such as path traversal.
Installation and Activation¶
After installation, the Web service must be restarted to make the change take effect.
Local installation:
dsh plugin --profile web add file:/绝对路径/dsh-chatfile
Install from GitHub:
dsh plugin --profile web add "git+https://github.com/sooya7/dsh-chatfile.git"
Restart the service:
After the installation command is executed, the dsh web service must be restarted.
dsh web restart
# or
sudo systemctl restart dsh-web.service
After restart, the plugin remains persistently available; refreshing the page or restarting the process will not remove it.
Typical Usage¶
After installation and service restart, the plugin can be used in the chat interface:
- Drag-and-drop upload: Drag any local file to the chat box area and release it. The file will be saved to the
uploads/directory in the current session workspace. - Button upload: Click the new 📎 button on the input toolbar, then select multiple files in the file picker to upload.
Notes¶
- Single-file limit: Host-side validation limits the maximum size of a single file to 50MB.
- Source review: The plugin runs with the current dsh process’s permissions; it is recommended to review the source code and license (MIT) before installation.
- Persistence: This plugin is a persistent plugin, unlike dynamic plugins that only exist within a session.
Conclusion¶
dsh-chatfile adds general-purpose file upload capability to DSH WebUI through simple drag-and-drop operations, enabling the Agent to read local files directly. For more implementation details and source code, refer to the project address.