diff --git a/.gitignore b/.gitignore index 5afb4c2..3bc2112 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ # The page index pageindex.json + +# All uploaded files +build/Files/* diff --git a/build/index.php b/build/index.php index f3d3a6c..e97d46a 100644 --- a/build/index.php +++ b/build/index.php @@ -174,6 +174,29 @@ $settings->footer_message = "All content is under editing_message = "By submitting your edit, you are agreeing to release your changes under this license. Also note that if you don't want your work to be edited by other users of this site, please don't submit it here!"; +// Whether to allow image uploads to the server. Currently disabled temporarily +// for security reasons while I finish writing the file uploader. +$settings->upload_enabled = true; + +// An array of mime types that are allowed to be uploaded. +$settings->upload_allowed_file_types = [ + "image/jpeg", + "image/png", + "image/gif", + "image/webp" +]; + +// The location of a file that maps mime types onto file extensions and vice +// versa. Used to generate the file extension for an uploaded file. Set to the +// default location of the mime.types file on Linux. If you aren't using linux, +// download this pastebin and point this setting at it instead: +// http://pastebin.com/mjM3zKjz +$settings->mime_extension_mappings_location = "/etc/mime.types"; + +// The minimum and maximum sizes of generated preview images in pixels. +$settings->min_preview_size = 1; +$settings->max_preview_size = 2048; + // A string of css to include. Will be included in the of every page // inside a