diff --git a/src/aeros_project/service.py b/src/aeros_project/service.py index c244b4f..bb64823 100644 --- a/src/aeros_project/service.py +++ b/src/aeros_project/service.py @@ -38,6 +38,13 @@ async def import_aro_project(*, db_session: DbSession, aeros_project_in: AerosPr status_code=400, detail=f"Invalid filename: {str(e)}" ) + + # Check if mime type is application/octet-stream + if file.content_type != "application/octet-stream": + raise HTTPException( + status_code=400, + detail="Invalid file type. Allowed: application/octet-stream" + ) # Get filename filename_without_ext = os.path.splitext(clean_filename)[0]