mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
fix: use local storage/ in dev, create upload dirs, gitignore uploads
This commit is contained in:
@@ -10,7 +10,12 @@ define('APP_ROOT', __DIR__);
|
||||
// Storage directory for uploaded files — intentionally outside the webroot
|
||||
// so no uploaded content is ever directly web-accessible (items #3 & #4).
|
||||
// Files are served through MediaController which validates paths and MIME types.
|
||||
define('STORAGE_ROOT', '/var/www/posterg/storage');
|
||||
// In dev (cli-server) use the local storage/ directory; in production use the
|
||||
// absolute path outside the webroot.
|
||||
define('STORAGE_ROOT', php_sapi_name() === 'cli-server'
|
||||
? __DIR__ . '/storage'
|
||||
: '/var/www/posterg/storage'
|
||||
);
|
||||
|
||||
// Error reporting
|
||||
if (php_sapi_name() === 'cli-server') {
|
||||
|
||||
0
app/storage/covers/.gitkeep
Normal file
0
app/storage/covers/.gitkeep
Normal file
0
app/storage/theses/.gitkeep
Normal file
0
app/storage/theses/.gitkeep
Normal file
Reference in New Issue
Block a user