1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# Pomf
Pomf is a simple file uploading and sharing platform.
Original development environment is Nginx + PHP5.5 + MySQL, but is confirmed to
work with Apache 2.4 and newer PHP versions. Should work with any other
PDO-compatible database.
## Install
For the purposes of this guide, we won't cover setting up Nginx, PHP, MySQL,
Node, or NPM. So we'll just assume you already have them all running well.
### Compiling
The assets are minified and combined using [Grunt](http://gruntjs.com/).
Assuming you already have Node and NPM working, compilation is easy. Use the
following shell code:
npm install -g grunt-cli
git clone https://git.pantsu.cat/pantsu/pomf.git
cd pomf/
npm install
grunt
After this, the pomf site is now compressed and set up inside `dist/`.
## Configuring
The majority of settings are in `static/includes/settings.inc.php`. Read the
comments in that file for more information.
For file size configuration, there is no server-side verification: we assume
that PHP and Nginx provide ample protection in this department. There is,
however, client-side configuration for max size, the `data-max-size` attribute
on the file input in `pages/upload_form.swig`.
Make sure to disable PHP from being executed on the file download
domain/directory (e.g., `a.pomf.example`), otherwise an attacker can upload a
malicious `.php` file and execute it on your server.
### Apache
If you are running Apache and want to compress your output when serving files,
add to your `.htaccess` file:
AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/x-javascript application/json
Remember to enable `deflate_module` and `filter_module` modules in your Apache
configuration file.
## Getting help
The Pantsu.cat community gathers on IRC. You can also email the maintainer for
help.
- IRC: `#pantsucat` on Partyvan (`irc.partyvan.eu`)
- Email: <hostmaster@pantsu.cat>
## Credits
Pomf was created by Eric Johansson and Peter Lejeck for
[Pomf.se](http://pomf.se/). The software is currently maintained by the
community.
## License
Pomf is free software, and is released under the terms of the Expat license. See
`LICENSE`.
|