mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Fixed Flask not choosing new name for uploading
Moved uploading and removing files to APIs Added max file upload to config from yml file Jquery is now a file not a CDN General Sass(y) fixes
This commit is contained in:
parent
5db8fa52e8
commit
2455d3f88c
13 changed files with 131 additions and 95 deletions
|
@ -32,13 +32,13 @@ def create_app(test_config=None):
|
|||
with open(os.path.join(app.root_path, 'user', 'conf.yml'), 'r') as f:
|
||||
conf = yaml.load(f, Loader=yaml.FullLoader)
|
||||
print("Loaded config")
|
||||
print(conf['upload']['allowed-extensions'])
|
||||
|
||||
# App configuration
|
||||
app.config.from_mapping(
|
||||
SECRET_KEY=os.environ.get('FLASK_SECRET'),
|
||||
DATABASE=os.path.join(app.instance_path, 'gallery.sqlite'),
|
||||
UPLOAD_FOLDER=os.path.join(app.root_path, 'user', 'uploads'),
|
||||
MAX_CONTENT_LENGTH = 1024 * 1024 * conf['upload']['max-size'],
|
||||
ALLOWED_EXTENSIONS=conf['upload']['allowed-extensions'],
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue