Line | |
---|
1 | partage
|
---|
2 | =======
|
---|
3 |
|
---|
4 | File upload system based on HTTP.
|
---|
5 |
|
---|
6 | Features
|
---|
7 | --------
|
---|
8 | + Simple web interface
|
---|
9 | + Link expiration
|
---|
10 | + Mimetype support
|
---|
11 | + Random filnames
|
---|
12 | + Multiple file uploads
|
---|
13 | + Privilege dropping
|
---|
14 | + `chroot(2)`-ed
|
---|
15 |
|
---|
16 | Usage
|
---|
17 | -----
|
---|
18 | Refer to the partage(1) manual page for details and examples.
|
---|
19 |
|
---|
20 | partage [-v] [-f partage.conf]
|
---|
21 |
|
---|
22 | Configuration is done from its configuration file, partage.conf(5).
|
---|
23 | The format is that of the INI file format.
|
---|
24 |
|
---|
25 | The following configuration will accept connections via fastcgi over
|
---|
26 | UNIX sockets. On startup the server will chroot into /var/www, and drop
|
---|
27 | privileges to the www:daemon user:
|
---|
28 |
|
---|
29 | bind = unix:/tmp/partage.sock
|
---|
30 | chroot = /var/www
|
---|
31 | user = www
|
---|
32 | group = daemon
|
---|
33 | maxsize = 2147483648 # 2 Gib
|
---|
34 |
|
---|
35 | Configuration
|
---|
36 | -------------
|
---|
37 | In order for the web interface to work, the server needs access to 2
|
---|
38 | template files, which must be location specified by the `tmplpath`
|
---|
39 | variable:
|
---|
40 |
|
---|
41 | - index.html
|
---|
42 | - upload.html
|
---|
43 |
|
---|
44 | Interface
|
---|
45 | ---------
|
---|
46 | Files are sent to the server using PUT and POST requests.
|
---|
47 | Using POST requests, one can set the expiration time by sending the
|
---|
48 | "expiry" parameter (in seconds).
|
---|
49 |
|
---|
50 | curl -X PUT -T file.png http://domain.tld
|
---|
51 | curl -X POST -Fuck=file.png -Fexpiry=3600 http://domain.tld
|
---|
52 |
|
---|
53 | Installation
|
---|
54 | ------------
|
---|
55 | Edit the `config.mk` file to match your setup, then run the following:
|
---|
56 |
|
---|
57 | $ mk
|
---|
58 | # mk install
|
---|
Note:
See
TracBrowser
for help on using the repository browser.