Skip to content

Commit cbc60b3

Browse files
authored
Merge pull request #684 from bigcapitalhq/getting-uploaded-object-uri
fix: Getting uploaded object uri
2 parents cd0bbd1 + 6caa131 commit cbc60b3

File tree

1 file changed

+5
-3
lines changed
  • packages/server/src/services/Attachments

1 file changed

+5
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import path from 'path';
22
import config from '@/config';
33

4-
54
export const getUploadedObjectUri = (objectKey: string) => {
6-
return path.join(config.s3.endpoint, config.s3.bucket, objectKey);
7-
}
5+
return new URL(
6+
path.join(config.s3.bucket, objectKey),
7+
config.s3.endpoint
8+
).toString();
9+
};

0 commit comments

Comments
 (0)