fix: Getting uploaded object uri

This commit is contained in:
Ahmed Bouhuolia
2024-10-01 15:09:21 +02:00
parent cd0bbd11c3
commit 6caa1311fd

View File

@@ -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();
};