2015-12-23 13:11:38 +00:00
|
|
|
# Create an empty config dict
|
|
|
|
config = dict()
|
2016-01-18 08:07:35 +00:00
|
|
|
|
2015-12-23 13:11:38 +00:00
|
|
|
##
|
|
|
|
#
|
|
|
|
# Main server configuration
|
|
|
|
#
|
|
|
|
##
|
2016-01-18 08:07:35 +00:00
|
|
|
|
2015-12-23 13:11:38 +00:00
|
|
|
config["HOST"] = "127.0.0.1"
|
2016-01-18 08:07:35 +00:00
|
|
|
|
|
|
|
# This string will be used in file URLs that are returned, you will need to include http:// or https://
|
|
|
|
config["DOMAIN"] = "http://example.com"
|
2015-12-23 13:11:38 +00:00
|
|
|
config["PORT"] = 8282
|
2016-01-18 08:07:35 +00:00
|
|
|
|
|
|
|
# Disable this for production use
|
2015-12-23 13:11:38 +00:00
|
|
|
config["DEBUG"] = True
|
2016-01-18 08:07:35 +00:00
|
|
|
|
2015-12-23 13:11:38 +00:00
|
|
|
# Extended debug will add extra debug output that's not normally provided by flask
|
|
|
|
config["EXTENDED_DEBUG"] = False
|
2016-01-18 08:07:35 +00:00
|
|
|
|
2015-12-23 13:11:38 +00:00
|
|
|
# Single user authentication, leave blank to disable authentication
|
|
|
|
config["KEY"] = ""
|
|
|
|
|
|
|
|
# File settings
|
|
|
|
config["UPLOAD_FOLDER"] = './data'
|
2015-12-24 16:00:59 +00:00
|
|
|
config["ALLOW_ALL_FILES"] = True
|
2015-12-23 13:11:38 +00:00
|
|
|
config["ALLOWED_EXTENSIONS"] = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'])
|
2016-01-18 08:07:35 +00:00
|
|
|
|
2015-12-23 21:45:40 +00:00
|
|
|
# If this is set to true, old files will be deleted. TIME is how far behind (in seconds) the last accessed time can be before files get deleted
|
|
|
|
config["DELETE_FILES"] = True
|
|
|
|
config["TIME"] = 30
|
2015-12-23 22:27:12 +00:00
|
|
|
config["CLEAN_INTERVAL"] = 120
|
2015-12-23 13:11:38 +00:00
|
|
|
|
|
|
|
# Site info displayed to the user
|
|
|
|
config["SITE_DATA"] = {
|
|
|
|
"title": "QuadFile"
|
|
|
|
}
|