Ajout de quelques changements pour acces libre
This commit is contained in:
@@ -19,6 +19,7 @@ import os # For VARS from the shell.
|
||||
# Variables
|
||||
|
||||
app = Flask(__name__)
|
||||
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'}
|
||||
|
||||
# Load the configuration file
|
||||
try:
|
||||
@@ -44,13 +45,12 @@ try:
|
||||
os.mkdir(UPLOAD_FOLDER)
|
||||
app.logger.debug(f"Directory '{UPLOAD_FOLDER}' created successfully.")
|
||||
except FileExistsError:
|
||||
app.logger.error(f"Directory '{UPLOAD_FOLDER}' already exists.")
|
||||
app.logger.debug(f"Directory '{UPLOAD_FOLDER}' already exists.")
|
||||
except PermissionError:
|
||||
app.logger.error(f"Permission denied: Unable to create '{UPLOAD_FOLDER}'.")
|
||||
except Exception as e:
|
||||
app.logger.error(f"An error occurred: {e}")
|
||||
|
||||
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'}
|
||||
|
||||
# Output the config file
|
||||
if os.getenv('LIPY_DEBUG') == True:
|
||||
|
||||
Reference in New Issue
Block a user