summary refs log tree commit diff
path: root/src/cdn
diff options
context:
space:
mode:
Diffstat (limited to 'src/cdn')
-rw-r--r--src/cdn/util/Storage.ts8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cdn/util/Storage.ts b/src/cdn/util/Storage.ts

index 1ab6a1d9..d9009aa9 100644 --- a/src/cdn/util/Storage.ts +++ b/src/cdn/util/Storage.ts
@@ -5,6 +5,7 @@ import { S3 } from "@aws-sdk/client-s3"; import fs from "fs"; import { bgCyan, black } from "picocolors"; import { S3Storage } from "./S3Storage"; +import { Paths } from "@fosscord/util"; process.cwd(); export interface Storage { @@ -16,12 +17,7 @@ export interface Storage { let storage: Storage; if (process.env.STORAGE_PROVIDER === "file" || !process.env.STORAGE_PROVIDER) { - let location = process.env.STORAGE_LOCATION; - if (location) { - location = path.resolve(location); - } else { - location = path.join(process.cwd(), "files"); - } + let location = Paths.CDNFilePath; console.log(`[CDN] storage location: ${bgCyan(`${black(location)}`)}`); //fse.ensureDirSync(location); fs.mkdirSync(location, { recursive: true });