Any webserver with PHP support (session, fileinfo, and exif).
- Upload files from the
srcdirectory. - Use
index.php(notindex.htm) as the entry page. - Configure a password hash via environment variable:
php -r "echo password_hash('replace-with-strong-password', PASSWORD_DEFAULT), PHP_EOL;"Then set:
UPLOADER_PASSWORD_HASH='<generated hash>'-
Optionally configure:
UPLOAD_DIR(default:./relative to project root)APP_BASE_URL(recommended, e.g.https://example.com)UPLOAD_URL_PREFIX(URL path prefix for uploaded files; default behavior is:- current folder when
UPLOAD_DIRis not set - empty when
UPLOAD_DIRis explicitly set)
- current folder when
-
Ensure upload directory permissions are least privilege (
0755or tighter based on your deployment).
https://dev.to/einlinuus/how-to-upload-files-with-php-correctly-and-securely-1kng
https://stackoverflow.com/questions/10717249/get-current-domain
https://stackoverflow.com/questions/51789617/php-get-url-of-current-file-directory
https://stackoverflow.com/questions/27036435/php-postpassword
https://blog.csdn.net/xgocn/article/details/79301171
https://stackoverflow.com/questions/4503135/php-get-site-url-protocol-http-vs-https
