Download attachments with original filenames

This commit is contained in:
Denis
2024-07-30 23:48:15 +03:00
parent 305ce29ebb
commit 832cdacebf
3 changed files with 23 additions and 6 deletions

View File

@@ -250,10 +250,12 @@ export class AttachmentsController extends BaseController {
res: Response,
next: NextFunction
): Promise<Response | void> {
const { tenantId } = req;
const { id: documentKey } = req.params;
try {
const presignedUrl = await this.attachmentsApplication.getPresignedUrl(
tenantId,
documentKey
);
return res.status(200).send({ presignedUrl });