General code clean up

This commit is contained in:
Scott Idem
2022-01-24 13:06:27 -05:00
parent b0537723a7
commit 86b06226cb
12 changed files with 55 additions and 55 deletions

View File

@@ -100,13 +100,13 @@ async def get_file_object_hash(file_object:File):
# ### BEGIN ### API Hosted File Route ### guess_file_extension() ###
def guess_file_extension(filename:str):
def guess_file_extension(filename: str):
return filename.rsplit('.', 1)[1].lower()
# ### END ### API Hosted File Route ### guess_file_extension() ###
# ### BEGIN ### API Hosted File Route ### allowed_file_extension() ###
def allowed_file_extension(extension:str, extension_list:list):
def allowed_file_extension(extension: str, extension_list: list):
return extension.lower() in extension_list # app.config['ALLOWED_EXTENSIONS']
# ### END ### API Hosted File Route ### allowed_file_extension() ###