a sexy uploader
- PHP 100%
| config.php | ||
| ee.png | ||
| favicon.ico | ||
| index.php | ||
| LICENSE | ||
| README.md | ||
uplodx
a sexy uploader
⚠️ Security warning: There is no limit on file size or file type. Please make sure that file permissions are set right so nobody can execute uploaded code. See server configuration for examples.
TODO
- Delete files
- Private files
- Sort by age
- Auto-remove old files
- AJAX Uploader
Installation
Just drop a PHP file in any directory.
Usage options
-
Through an interface:
- Choose files via dialogue
- Drop files, via HTML5 drag'and'drop (using dropzone.js)
- Basic HTML Form (if no JavaScript is suported)
-
Upload using any compatible tool (like cURL)
This example will upload a file and copy URL to clipboard:
curl -F "file[]=@file.jpg" uplodx.ml | xclip -sel clip
Server configuration
Do not allow uploaded code execution!
NGINX configuration example
Edit the NGINX configuration file (/etc/nginx/sites-enabled/uplodx):
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx;
index index.php;
server_name localhost;
location / {
try_files $uri $uri/ =404;
}
error_page 404 /index.php;
location /index.php {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}