diff --git a/server/app/main.py b/server/app/main.py index 715fa631..c8d60aff 100644 --- a/server/app/main.py +++ b/server/app/main.py @@ -29,13 +29,13 @@ continue print(f"Loading {file}") - if file.suffix == ".json": + if file.suffix.lower() == ".json": with open(file) as f: adapter.json.read_aas_json_file_into(object_store, f) - elif file.suffix == ".xml": + elif file.suffix.lower() == ".xml": with open(file) as f: adapter.xml.read_aas_xml_file_into(object_store, file) - elif file.suffix == ".aasx": + elif file.suffix.lower() == ".aasx": with aasx.AASXReader(file) as reader: reader.read_into(object_store=object_store, file_store=file_store) @@ -44,3 +44,6 @@ else: print(f"STORAGE_TYPE must be either LOCAL_FILE or LOCAL_FILE_READ_ONLY! Current value: {storage_type}", file=sys.stderr) + +# Lower the suffix +# Lower the suffixes to also match the filenames with uppercase suffixes \ No newline at end of file