droopy is a unique page where you simply drop and upload any file size, thanks to chunking. Based on Dropzone.js and php.
Default chunk size of 1M to bypass most enterprise proxies or simply your own server limit (unless you can increase upload_max_filesize in php.ini).
- chunking: bypass all proxy/server/php limitations
- grab download link under each file uploaded
- file names are html protected on both sides
- handles custom subfolders based on file extension or name
- fallback methods and command line ready with curl
- works out of the box. No configuration needed
- superbe error messages
- simplicity
- PHP 7+
- System.php
- Clone the repo
mkdir droopy/uploadssubfolder- Create more custom subfolders as needed, and update
- Serve it via nginx
- Done.
Rename .chunk_custom.inc.php.example to .chunk_custom.inc.php and edit it to your liking, content isself-evident:
<?php
// your public folder to download the files:
$customPublicUri = "uploads";
// sobfolders from /customPublicUri/ for specific file names or extensions
$customFiles = array(
"batchs" => array(
"filename" => array('filename1.cmd','filename2.cmd'),
),
"DCIM" => array(
"extension" => array('NEF', 'RAW'),
)
);This application only protects you from transversal exploit. This is PHP, security is on you.
You need at least basic authentication at the nginx level, or bad things will happen to you. Unless you want it public?
nginx proxy example below for linuxserver/nginx:
server {
listen 80 dockerNetworkName;
server_name dockerNetworkName;
set $root /var/www/html/yoursite.com/public;
if (!-d /var/www/html/yoursite.com/public) {
set $root /config/www;
}
root $root;
index index.html index.htm index.php;
## uploader
location /droopy/uploads/ {
autoindex on;
}
location / {
# enable for basic auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
try_files $uri $uri/ /index.html /index.php$is_args$args =404;
}
location ~ ^(.+\.php)(.*)$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
# deny access to .htaccess/.htpasswd files
location ~ /\.ht {
deny all;
}
}
Dropzone.js: File uploads made easy
- PHP: load custom stuff from an include file
- PHP: prevents file system from exploding
- UI: add some form options to the front such as chunk size, chunk on/off etc
- PHP: loads cutomizations from a json file or custom.inc
- UI: ability to delete newly uploaded files, until page refresh
- PHP: ability to delete newly uploaded files, until page refresh
- UI: create an nginx/php quirk to have dynamic and unique urls to share files?
- ?: ability to setup retention from the front and default retention at the backend
- PHP: mkdir subfolders
- PHP: file names are html protected
- UI: file names are html protected
- UI: shows download link under each file
- PHP: handles custom subfolders based on file extension or name
- PHP: protect filenames in the _GET
- PHP: handle multiple custom subfolders based on a dictionary
- UI: add non-chunk, command line example
- UI: add non-chunk, native and basic 1-file upload form
- PHP: handle filename without extension
MIT
