__
___ / _|_ _
/ _ \| |_| | | |
| (_) | _| |_| |
\___/|_| \__,_|
one file uploader
This is a minimal PHP script for uploading files. I have only deployed this on Apache so unsure how it would work with other webservers.
- Multiple files at once
- Basic HTTP authentication
- MIME type allowlist
- Retention graph
curl -F "files[][email protected]" -F "files[][email protected]" https://yourdomain
Or use the webform
Root Directory:
Options -FollowSymLinks -MultiViews -Indexes
AddDefaultCharset UTF-8
RewriteEngine On
RewriteCond "%{ENV:REDIRECT_STATUS}" "^$"
RewriteRule "^/?$" "index.php" [L,END]
RewriteRule "^(.+)$" "files/$1" [L,END]
Files Directory
Options -ExecCGI -FollowSymLinks -MultiViews -Indexes
php_flag engine off
SetHandler None
AddType text/plain .php .php5 .phtml .html .htm .cpp .c .h .sh .cmd .bat .jar
This is a fork of rouji/single_php_filehost
File validation code adapted from php.net answer by CertaiN
HTTP Basic Auth code adapted from Gist by westonruter