bizou/config.php
Théophile Bastian 02479196c6 Handle absolute paths for images and data dirs
Bizou now handles correctly data and images directories. One can now
configure

* `MEDIA_BASE_DIR`: base directory for `images` and `data` and
* `{IMAGES,DATA}_URL`: the base url that should be used to point to a
  file in `IMAGES_DIR` (resp. `DATA_DIR`).

Assuming the web server itself can correctly serve those files at the
given URL and Bizou has the correct permissions for those locations,
Bizou should be able to work as well as using relative paths.
2017-11-28 18:59:23 +01:00

19 lines
861 B
PHP

<?php
## WARNING ##
# ALWAYS make sure your `DATA_DIR` and `DATA_URL` (resp. IMAGES_) are
# consistent. If you are using relative paths, it will be enforced by default.
# If you are using absolute paths (ie. `MEDIA_BASE_DIR` is absolute), you will
# have to make sure your web server serves `DATA_DIR` at `DATA_URL` (resp.
# IMAGES_).
#############
define('THUMB_SIZE', 100);
define('JPEG_QUALITY', '80');
define('MEDIA_BASE_DIR', ''); # Useful whenever those should be absolute locations
define('DATA_DIR', MEDIA_BASE_DIR . 'data');
define('DATA_URL', DATA_DIR); # Used in urls, but not in filesystem paths
define('IMAGES_DIR', MEDIA_BASE_DIR . 'images');
define('IMAGES_URL', IMAGES_DIR); # Used in urls, but not in filesystem paths
define('DATA_UMASK', 0002); # 0002: allow group to write for files created in data dir. change to 0022 to be more strict.
?>