In a DeepSeek Harness Web session, the Markdown renderer only accepts http/https image sources. Locally saved screenshots and AI-generated images (file: or data: protocols) are filtered out directly. As a result, after the AI reports “the image has been saved to D:\shots\fig1.png”, the user can only see a line of non-rendered text and cannot view the image directly in the conversation.
The dsh-image-serve plugin solves this gap by registering a /ws route that maps local absolute paths to Web-accessible URLs. After installation, Markdown in the session can render images and files from anywhere on disk directly via /ws/.
What It Is¶
A local file display plugin developed by carlclouder. It is a standard npm bundle with zero runtime dependencies and can be hot-started, hot-stopped, updated, or uninstalled in dsh-market. The core function of the plugin is to register a /ws route in DSH Web, mapping /ws/<absolute local path> to the corresponding disk file so that the Markdown renderer can render local resources.
Installation and Activation¶
Run the following command in the terminal to install the plugin through the plugin system:
dsh plugin --profile web add dsh-image-serve
After installation is complete, restart the DSH Web service to apply the changes.
Typical Usage¶
After installing and restarting, when referencing files in Markdown, replace the file: protocol with http://127.0.0.1:3080/ws/, followed by the local absolute path:
http://127.0.0.1:3080/ws/D:/AI任务/Generated/cover.png
http://127.0.0.1:3080/ws/D:/AI任务/ (指向目录 → 返回可浏览的文件列表页)
http://127.0.0.1:3080/ws/D:\截图\对比图.png (反斜杠写法等价)
http://127.0.0.1:3080/ws//NAS/share/方案.png (UNC 网络路径)
Core Features¶
- Directory browsing: When pointing to a directory, it returns a clickable HTML file list, including subdirectories, file sizes, modification times, and parent-level navigation. File names are HTML-escaped.
- Zero dependencies: It is a standard npm bundle and supports hot start/stop, updates, and uninstallation in dsh-market.
- Cross-platform support: Tested to support multiple drive letters (C:/D:/E:/…), Chinese paths, deeply nested directories, and UNC network paths.
- Explicit error reporting: Relative paths return 400 with a prompt, nonexistent files return 404, and non-GET/HEAD requests return 405.
Notes and Security¶
- No whitelist design:
/wsis a read channel for arbitrary local files. The whitelist design was removed starting from v2.1. - Access scope: The reachable scope of the route is the same as the reachable scope of dsh web. By default, it is local loopback only (127.0.0.1), but if the Web interface is exposed remotely via Tailscale or similar methods, remote devices can also read arbitrary local files.
- Read-only mode: The plugin provides read-only service and does not support writing, deleting, or directory-listing operations.
- Path requirements: Absolute local paths must be used. Relative paths return 400 errors.
- Protocol restrictions: Only GET and HEAD requests are supported.
- Legacy compatibility: Old short links
…/ws/<filename>(implicitly rooted at D:\AI任务) no longer work and must be rewritten to the full-path form (for example,…/ws/D:/AI任务/<filename>). - Configuration cleanup: The
rootconfiguration no longer exists. If you previously added related override lines in a profile patch, it is recommended to remove them.
Summary¶
dsh-image-serve solves the problem that local files cannot be displayed directly in DSH Web sessions. Through the /ws/ route, developers can conveniently reference files on any drive letter and at any path without manually copying them to a specific directory. When using it, pay attention to its no-whitelist behavior and the risks associated with remote access.
- GitHub repository: https://github.com/carlclouder/dsh-image-serve
- Plugin directory: https://www.skillhub.cn/plugins/carlclouder/dsh-image-serve