mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
Merge pull request #684 from bigcapitalhq/getting-uploaded-object-uri
fix: Getting uploaded object uri
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import config from '@/config';
|
import config from '@/config';
|
||||||
|
|
||||||
|
|
||||||
export const getUploadedObjectUri = (objectKey: string) => {
|
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