(input: {
workspaceId: string;
filename: string;
mediaType?: string | null;
sizeBytes: number;
dataBase64: string;
})
| 6942 | } |
| 6943 | |
| 6944 | async stageAttachment(input: { |
| 6945 | workspaceId: string; |
| 6946 | filename: string; |
| 6947 | mediaType?: string | null; |
| 6948 | sizeBytes: number; |
| 6949 | dataBase64: string; |
| 6950 | }): Promise<Result<StagedWorkspaceAttachment, string>> { |
| 6951 | const metadata = await this.getInfo(input.workspaceId); |
| 6952 | if (metadata == null) { |
| 6953 | return Err("Workspace not found"); |
| 6954 | } |
| 6955 | |
| 6956 | const { runtime, workspacePath } = createRuntimeContextForWorkspace(metadata); |
| 6957 | return stageWorkspaceAttachment({ |
| 6958 | runtime, |
| 6959 | workspacePath, |
| 6960 | filename: input.filename, |
| 6961 | mediaType: input.mediaType, |
| 6962 | sizeBytes: input.sizeBytes, |
| 6963 | dataBase64: input.dataBase64, |
| 6964 | }); |
| 6965 | } |
| 6966 | |
| 6967 | async downloadStagedAttachment(input: { |
| 6968 | workspaceId: string; |
no test coverage detected