Skip to content

Commit 0109ed1

Browse files
authored
Merge pull request #123 from topcoder-platform/PM-2217_download-run-attachment
fix content dispozition for run attachment
2 parents 6a14430 + e446d6e commit 0109ed1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/api/ai-workflow/ai-workflow.controller.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ export class AiWorkflowController {
262262
required: true,
263263
})
264264
@ApiResponse({
265-
status: 302,
266-
description: 'Redirect to the blob to download',
265+
status: 200,
266+
description: 'Download the workflow run attachment',
267267
})
268268
@ApiResponse({ status: 403, description: 'Forbidden.' })
269269
async downloadRunAttachment(
@@ -280,7 +280,9 @@ export class AiWorkflowController {
280280
user,
281281
);
282282

283-
return new StreamableFile(zipResponse.data);
283+
return new StreamableFile(zipResponse.data, {
284+
disposition: `attachment; filename="${runId}-${attachmentId}.zip"`,
285+
});
284286
}
285287

286288
@Post('/:workflowId/runs/:runId/items')

0 commit comments

Comments
 (0)