Added base_path settings (which you normally don't need to touch)
[simple-upload.git] / index.php
index 78e5ff4f63882054d89fed80fa2b0c2909a280fc..61c6488e36feee6746f2da70b0cbb8daf90169fe 100644 (file)
--- a/index.php
+++ b/index.php
                // Website title
                'title' => 'strace.club',
 
-               // Directory to store uploaded files
+               // Base path (auto-detection)
+               'base_path' => dirname(__FILE__) . DIRECTORY_SEPARATOR,
+
+               // Directory to store uploaded files (relative to base_path)
                'uploaddir' => '.',
 
                // Display list uploaded files
        $data['ignores'][] = basename($data['scriptname']);
 
        // Use canonized path
-       $data['uploaddir'] = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . $settings['uploaddir']);
+       $data['uploaddir'] = realpath($settings['base_path'] . $settings['uploaddir']);
 
        // Maximum upload size, set by system
        $data['max_upload_size'] = ini_get('upload_max_filesize');