Simple single-file PHP file upload (file share hosting) script.
-> :warning: **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 executables. Or exscape your desired directory! Please skip to server configuration for examples.
+> :warning: **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](#server-configuration) for examples.
+
+## TODO
+
+- [x] Delete files
+- [x] Private files
+- [x] Sort by age
+- [x] Auto-remove old files
+- [ ] AJAX Uploader
## Installation
There are few options that you can change by editing the file itself:
-
- Directory to store uploaded files
`uploaddir` => `'.'`
This example will upload a file and copy URL to clipboard:
```bash
- curl -F "file=@file.jpg" your-host/sharing/ | xclip -sel clip
+ curl -F "file[]=@file.jpg" strace.club | xclip -sel clip
```
## Server configuration
### NGINX configuration example
+Edit the NGINX configuration file (`/etc/nginx/sites-enabled/fileuploader`):
+
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
fastcgi_index index.php;
include fastcgi_params;
}
- }
\ No newline at end of file
+ }