improved env config
This commit is contained in:
@@ -6,7 +6,7 @@ export default function createFolder({ filePath }: { filePath: string }) {
|
||||
if (s3Client) {
|
||||
// Do nothing, S3 creates directories recursively
|
||||
} else {
|
||||
const storagePath = process.env.STORAGE_FOLDER;
|
||||
const storagePath = process.env.STORAGE_FOLDER || "data";
|
||||
const creationPath = path.join(process.cwd(), storagePath + "/" + filePath);
|
||||
|
||||
fs.mkdirSync(creationPath, { recursive: true });
|
||||
|
||||
Reference in New Issue
Block a user