refactor: change to response url instead
This commit is contained in:
parent
95d657f7e2
commit
7e03c239d3
2 changed files with 8 additions and 12 deletions
|
|
@ -574,12 +574,10 @@ export class CustomerAttachmentController extends Controller {
|
|||
);
|
||||
}
|
||||
|
||||
return req.res?.redirect(
|
||||
await minio.presignedGetObject(
|
||||
MINIO_BUCKET,
|
||||
`${attachmentLocation(record.customerId, branchId)}/${filename}`,
|
||||
12 * 60 * 60,
|
||||
),
|
||||
return await minio.presignedGetObject(
|
||||
MINIO_BUCKET,
|
||||
`${attachmentLocation(record.customerId, branchId)}/${filename}`,
|
||||
12 * 60 * 60,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -819,12 +819,10 @@ export class EmployeeAttachmentController extends Controller {
|
|||
throw new HttpError(HttpStatus.NOT_FOUND, "Employee cannot be found.", "employeeNotFound");
|
||||
}
|
||||
|
||||
return req.res?.redirect(
|
||||
await minio.presignedGetObject(
|
||||
MINIO_BUCKET,
|
||||
attachmentLocation(record.id, filename),
|
||||
12 * 60 * 60,
|
||||
),
|
||||
return await minio.presignedGetObject(
|
||||
MINIO_BUCKET,
|
||||
attachmentLocation(record.id, filename),
|
||||
12 * 60 * 60,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue