mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-13 12:14:40 +00:00
fix: use resolved workspace dir for StorageHandler in Docker deployments
StorageHandler was hardcoded to browse ~/.goclaw/, which is empty in Docker where volumes mount to separate paths (GOCLAW_WORKSPACE). Use the already-resolved workspace variable so the Storage page correctly shows workspace files regardless of deployment layout.
This commit is contained in:
1 parent
06b4eb912e
commit
8ad425f5f8
1 file changed
+4
-2
+4
-2
@@ -753,8 +753,10 @@ func runGateway() {
|
||||
// Supports media from any agent workspace (each agent has its own workspace from DB).
|
||||
server.SetFilesHandler(httpapi.NewFilesHandler(cfg.Gateway.Token))
|
||||
|
||||
// Storage file management — browse/delete files under ~/.goclaw/ (excluding skills dirs).
|
||||
server.SetStorageHandler(httpapi.NewStorageHandler(config.ExpandHome("~/.goclaw"), cfg.Gateway.Token))
|
||||
// Storage file management — browse/delete files under the resolved workspace directory.
|
||||
// Uses GOCLAW_WORKSPACE (or default ~/.goclaw/workspace) so it works correctly
|
||||
// in Docker deployments where volumes are mounted outside ~/.goclaw/.
|
||||
server.SetStorageHandler(httpapi.NewStorageHandler(workspace, cfg.Gateway.Token))
|
||||
|
||||
// Media upload endpoint — accepts multipart file uploads, returns temp path + MIME type.
|
||||
server.SetMediaUploadHandler(httpapi.NewMediaUploadHandler(cfg.Gateway.Token))
|
||||
|
||||
Reference in new issue
Block a user