Save uploaded files to disk — even when the model rejects them.
When you attach an image and the model says "this model does not support image input", the file is lost. This plugin catches those files and saves them anyway.
- Saves every file you upload, regardless of model support
- Recovers rejected files by scanning OpenCode's database after errors
- Tells the model where files are by injecting paths into the system prompt
git clone https://github.com/procodingtools/opencode-chat-file-saver.git
cd opencode-chat-file-saver
npm install && npm run buildThen copy the compiled plugin:
cp dist/index.js ~/.opencode/plugins/file-saver.jsOr install locally into your OpenCode config directory:
npm install ./opencode-chat-file-saver.opencode/uploads/<session-id>/
1747145600000_photo.jpeg
1747145600000_prt_xxx_screenshot.png
No config needed. It just works.
MIT