|
|
|
|
@ -39,12 +39,14 @@ async def import_aro_project(*, db_session: DbSession, aeros_project_in: AerosPr
|
|
|
|
|
detail=f"File type not allowed. Allowed: {ALLOWED_EXTENSIONS}"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
print("read file")
|
|
|
|
|
|
|
|
|
|
# Read and check file size
|
|
|
|
|
content = await file.read()
|
|
|
|
|
if len(content) > MAX_FILE_SIZE:
|
|
|
|
|
raise HTTPException(
|
|
|
|
|
status_code=400,
|
|
|
|
|
detail="File too large. Max size: 100MB"
|
|
|
|
|
detail="File too large. Max size: 100Mb"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -67,6 +69,7 @@ async def import_aro_project(*, db_session: DbSession, aeros_project_in: AerosPr
|
|
|
|
|
"file": (file.filename, content, file.content_type or "application/octet-stream")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
print("fetch")
|
|
|
|
|
response = await client.post(
|
|
|
|
|
f"{WINDOWS_AEROS_BASE_URL}/api/aeros/upload-file",
|
|
|
|
|
files=files
|
|
|
|
|
|