mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-06 13:45:17 +02:00
chore: Update S3 endpoint configuration to use MINIO_CLIENT_OVERRIDE
This commit is contained in:
parent
d3112c2925
commit
2f5bdc052d
1 changed files with 6 additions and 1 deletions
|
@ -116,7 +116,12 @@ export const deleteObject = async (bucketName: string, fileName: string) => {
|
||||||
|
|
||||||
export const getObjectUrl = (bucketName: string, fileName: string): string => {
|
export const getObjectUrl = (bucketName: string, fileName: string): string => {
|
||||||
let objectUrl: string;
|
let objectUrl: string;
|
||||||
let endpoint = env.MINIO_CLIENT_OVERRIDE as string;
|
let endpoint: string = "";
|
||||||
|
if (env.MINIO_CLIENT_OVERRIDE) {
|
||||||
|
endpoint = env.MINIO_CLIENT_OVERRIDE as string;
|
||||||
|
} else {
|
||||||
|
endpoint = env.AWS_S3_ENDPOINT as string;
|
||||||
|
}
|
||||||
|
|
||||||
if (endpoint.includes("amazonaws.com")) {
|
if (endpoint.includes("amazonaws.com")) {
|
||||||
// Amazon S3
|
// Amazon S3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue