diff --git a/packages/server/src/services/Attachments/utils.ts b/packages/server/src/services/Attachments/utils.ts index 50af9da9d..4f58fbc9c 100644 --- a/packages/server/src/services/Attachments/utils.ts +++ b/packages/server/src/services/Attachments/utils.ts @@ -1,7 +1,9 @@ import path from 'path'; import config from '@/config'; - export const getUploadedObjectUri = (objectKey: string) => { - return path.join(config.s3.endpoint, config.s3.bucket, objectKey); -} \ No newline at end of file + return new URL( + path.join(config.s3.bucket, objectKey), + config.s3.endpoint + ).toString(); +};