fix media directory path for linux/ubuntu
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,9 @@ app.use(cors());
|
|||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
|
|
||||||
// Ensure media directory exists
|
// Ensure media directory exists
|
||||||
const mediaDir = '/opt/homebrew/var/www/signsync/media';
|
const mediaDir = process.platform === 'darwin'
|
||||||
|
? '/opt/homebrew/var/www/signsync/media'
|
||||||
|
: path.join(__dirname, '..', 'public', 'media');
|
||||||
if (!fs.existsSync(mediaDir)) {
|
if (!fs.existsSync(mediaDir)) {
|
||||||
fs.mkdirSync(mediaDir, { recursive: true });
|
fs.mkdirSync(mediaDir, { recursive: true });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user