diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-07-19 07:21:26 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-08-09 23:28:27 +0200 |
commit | 279ec10081f245f4d5bbca8b63485c841f619e35 (patch) | |
tree | 4e58b7bb26fa3f5f60cfc8888b9f37a258146083 /cdn/src/util/Storage.ts | |
parent | update node types to v18, ditch node-fetch (diff) | |
download | server-279ec10081f245f4d5bbca8b63485c841f619e35.tar.xz |
State update, havent tested
Diffstat (limited to 'cdn/src/util/Storage.ts')
-rw-r--r-- | cdn/src/util/Storage.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cdn/src/util/Storage.ts b/cdn/src/util/Storage.ts index 89dd5634..728804a0 100644 --- a/cdn/src/util/Storage.ts +++ b/cdn/src/util/Storage.ts @@ -1,6 +1,7 @@ import { FileStorage } from "./FileStorage"; import path from "path"; -import fse from "fs-extra"; +//import fse from "fs-extra"; +import fs from "fs"; import { bgCyan, black } from "picocolors"; import { S3 } from "@aws-sdk/client-s3"; import { S3Storage } from "./S3Storage"; @@ -22,7 +23,8 @@ if (process.env.STORAGE_PROVIDER === "file" || !process.env.STORAGE_PROVIDER) { location = path.join(process.cwd(), "files"); } console.log(`[CDN] storage location: ${bgCyan(`${black(location)}`)}`); - fse.ensureDirSync(location); + //fse.ensureDirSync(location); + fs.mkdirSync(location, {recursive: true}); process.env.STORAGE_LOCATION = location; storage = new FileStorage(); |