]> git.mxchange.org Git - simple-upload.git/blob - README.md
:memo: Updated options docs
[simple-upload.git] / README.md
1 # Simple PHP upload
2
3 Simple single-file PHP file upload (file share hosting) script.
4
5 > :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!
6
7 ## Installation
8
9 Just drop a PHP file in any directory. It will work straight away
10
11 ## Configuration
12
13 There are few options that you can change by editing the file itself:
14
15
16 - `uploaddir` => `'.'`
17         Directory to store uploaded files
18
19
20 - `listfiles` => `true`
21         Display list uploaded files
22
23
24 - `listfiles_size` => `true`
25         Display file sizes
26
27
28 - `listfiles_date` => `true`
29         Display file dates
30
31
32 - `listfiles_date_format` => `'F d Y H:i:s'`
33         Display file dates format
34
35
36 - `random_name_len` => `10`
37         Randomize file names (number of 'false')
38
39
40 - `random_name_keep_type` => `true`
41         Keep filetype information (if random name is activated)
42
43
44 - `random_name_alphabet` => `'qwertyuiodfgjkcvbnm'`
45         Random file name letters
46
47
48 - `debug` => `false`
49         Display debugging information
50
51
52
53 - `uploaddir => '.'`
54         Directory to store the uploaded files. Defaults to rurrect script directory
55
56 - `listfiles => true`
57         Option that will list all files in uploads directory. Enabled by default
58
59 - `debug => false`
60         To display debugging information
61
62 ## Usage options
63
64 - Through an interface:
65         - Choose files via dialogue
66         - Drop files, via HTML5 drag'and'drop (using [dropzone.js](http://www.dropzonejs.com/))
67         - Basic HTML Form (if no JavaScript is suported)
68 - Upload using any compatible tool (like cURL)
69
70         This example will upload a file and copy URL to clipboard:
71
72         ```bash
73         curl -F "file=@file.jpg" your-host/sharing/ | xclip -sel clip
74         ```