Skip to content

Commit

Permalink
Merge pull request #684 from bigcapitalhq/getting-uploaded-object-uri
Browse files Browse the repository at this point in the history
fix: Getting uploaded object uri
  • Loading branch information
abouolia authored Oct 1, 2024
2 parents cd0bbd1 + 6caa131 commit cbc60b3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/server/src/services/Attachments/utils.ts
Original file line number Diff line number Diff line change
@@ -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);
}
return new URL(
path.join(config.s3.bucket, objectKey),
config.s3.endpoint
).toString();
};

0 comments on commit cbc60b3

Please sign in to comment.