Introduction

In agent development with DSH (DeepSeek Harness), file management often relies on external tools or manual maintenance. The seeingrain/dsh-upload-file plugin treats the file system directly as a registry, providing isolated file storage for each session. It uses the Paperclip library to implement upload, thumbnail generation, and re-download capabilities, making it suitable for scenarios that require frequent file references or run on standalone servers.

What It Is

This is a DSH plugin named seeingrain/dsh-upload-file, maintained by seeingrain and licensed under the MIT License.

  • Core positioning: A DSH plugin for file upload with the Paperclip library, session isolation, thumbnails, and re-download functionality.
  • Problem solved: Addresses the inability to upload files directly in DSH chats, the difficulty of referencing file paths, and file mixing across sessions.

Core Features

  • Session isolation: Files are stored in <workspace>/.uploaded_files/<sessionId>/, with dual isolation at the workspace and session levels, so they do not interfere with one another.
  • Multi-file upload: Supports uploading multiple files selected at once and displays a progress bar.
  • File list and thumbnails: The list displays file names and sizes; thumbnails or type icons are generated for images, videos, and PDFs, and the most recently uploaded file is pinned to the top.
  • @ mention: Use the @UPLOAD:filename format in the input box to mention a file so the model can use it directly.
  • Right-click menu: Provides six actions: @ mention, open (in the default program or sidebar), copy path/name, re-download, and delete.
  • Security mechanisms: SHA-256 verification throughout the entire process, path traversal protection, and strict sessionId validation.
  • Thumbnail service: Server-side lazy thumbnail generation supporting images, videos, and PDFs, using immutable caching headers.
  • Automatic naming: Re-uploading a file with the same name in the same session automatically adds suffixes such as _1 and _2.

Installation and Enabling

Install the plugin via CLI:

dsh plugin --profile web add github:seeingrain/dsh-upload-file

After installation, the host side needs to be restarted, and the client side only needs to refresh the page to load it.

Typical Usage

  • Upload files: Click the 📎 button in the input toolbar and select multiple files to upload to the current session.
  • Reference files: Enter @UPLOAD:filename in the input box to provide the file to the model.
  • File operations: Right-click an entry in the file list and choose to open it, copy its path, or delete the file.
  • Server-side storage: Files are uploaded directly to the DSH server for long-term reference within sessions.

Applicable Scenarios and Cautions

  • System tool dependencies: Thumbnail generation requires ffmpeg for images/videos and pdftoppm for PDFs. If tools are missing, files will fall back to the original image or a type badge.
  • Supported file types: Currently supports images, videos, and PDFs. Office documents (docx/xlsx/pptx) have reserved interfaces, currently only showing a type badge. SVG files do not generate thumbnails.
  • Irreversible operation: Deleting files is permanent, with no recycle bin mechanism.
  • Caching strategy: Thumbnails are generated once, then cached with immutable headers.

Brief Conclusion

By using the file-system-as-registry pattern, the plugin gives DSH structured file management capabilities. If you want to run DSH as a server and allow the model to directly access uploaded files, this is a practical choice.

  • GitHub: https://github.com/seeingrain/dsh-upload-file
  • Catalog page: https://www.skillhub.cn/plugins/seeingrain/dsh-upload-file