Create directory if necessary

pull/126/head
tycrek 3 years ago
parent ed6595fc3b
commit 7ca47df7bc
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -23,7 +23,7 @@ if (!fs.existsSync(configPath)) {
//#endregion
// Load the JSON
const { host, port, useSsl, isProxied, s3enabled, frontendName, indexFile, useSia }: Config = fs.readJsonSync(path('config.json'));
const { host, port, useSsl, isProxied, s3enabled, frontendName, indexFile, useSia, diskFilePath }: Config = fs.readJsonSync(path('config.json'));
const { CODE_INTERNAL_SERVER_ERROR }: MagicNumbers = fs.readJsonSync(path('MagicNumbers.json'));
const { name, version, homepage }: Package = fs.readJsonSync(path('package.json'));
@ -47,6 +47,9 @@ import { users } from './auth';
import { data } from './data';
//#endregion
// Create thumbnails directory
fs.ensureDirSync(path(diskFilePath, 'thumbnails'));
// Enable/disable Express features
app.enable('case sensitive routing');
app.disable('x-powered-by');

Loading…
Cancel
Save