diff --git a/cam/cam.go b/cam/cam.go index daf0772..e801a0c 100644 --- a/cam/cam.go +++ b/cam/cam.go @@ -268,8 +268,8 @@ func (vs *videostore) DoCommand(_ context.Context, command map[string]interface{ } uploadFileName := filepath.Base(uploadFilePath) return map[string]interface{}{ - "command": "save", - "file": uploadFileName, + "command": "save", + "filename": uploadFileName, }, nil case "fetch": vs.logger.Debug("fetch command received") diff --git a/tests/save_test.go b/tests/save_test.go index 96b5b58..af899e2 100644 --- a/tests/save_test.go +++ b/tests/save_test.go @@ -125,7 +125,7 @@ func TestSaveDoCommand(t *testing.T) { if err != nil { t.Fatalf("failed to execute save command: %v", err) } - filename, ok := res["file"].(string) + filename, ok := res["filename"].(string) if !ok { t.Fatalf("failed to parse filename from response: %v", res) }