fix: Getting uploaded object uri
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user