Skip to content
/ ofu Public

One File Uploader -- A simple PHP uploading script

License

Notifications You must be signed in to change notification settings

mulquin/ofu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 

Repository files navigation

         __       
   ___  / _|_   _ 
  / _ \| |_| | | |
 | (_) |  _| |_| |
  \___/|_|  \__,_|
        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.

Features

  • Multiple files at once
  • Basic HTTP authentication
  • MIME type allowlist
  • Retention graph

Usage

curl -F "files[][email protected]" -F "files[][email protected]" https://yourdomain

Or use the webform

.htaccess info

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

Credits

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

Secure file upload resources

About

One File Uploader -- A simple PHP uploading script

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages