|
|
|
@ -99,8 +99,6 @@ async def import_aro_project(*, db_session: DbSession, aeros_project_in: AerosPr
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return clean_filename
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Project name hardcode
|
|
|
|
# Project name hardcode
|
|
|
|
# project_name = "trialapi"
|
|
|
|
# project_name = "trialapi"
|
|
|
|
|
|
|
|
|
|
|
|
@ -116,17 +114,26 @@ async def import_aro_project(*, db_session: DbSession, aeros_project_in: AerosPr
|
|
|
|
# await file.seek(0)
|
|
|
|
# await file.seek(0)
|
|
|
|
|
|
|
|
|
|
|
|
# Prepare file for upload
|
|
|
|
# Prepare file for upload
|
|
|
|
files = {
|
|
|
|
# files = {
|
|
|
|
"file": (clean_filename, content, file.content_type or "application/octet-stream")
|
|
|
|
# "file": (clean_filename, content, file.content_type or "application/octet-stream")
|
|
|
|
}
|
|
|
|
# }
|
|
|
|
|
|
|
|
|
|
|
|
print("fetch")
|
|
|
|
response = await aeros_file_upload(
|
|
|
|
response = await client.post(
|
|
|
|
"/api/upload",
|
|
|
|
f"{WINDOWS_AEROS_BASE_URL}/upload-file",
|
|
|
|
file,
|
|
|
|
files=files
|
|
|
|
"file",
|
|
|
|
|
|
|
|
clean_filename
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
response.raise_for_status()
|
|
|
|
response.raise_for_status()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# print("fetch")
|
|
|
|
|
|
|
|
# response = await client.post(
|
|
|
|
|
|
|
|
# f"{WINDOWS_AEROS_BASE_URL}/upload-file",
|
|
|
|
|
|
|
|
# files=files
|
|
|
|
|
|
|
|
# )
|
|
|
|
|
|
|
|
# response.raise_for_status()
|
|
|
|
|
|
|
|
|
|
|
|
# Get the file path from the response
|
|
|
|
# Get the file path from the response
|
|
|
|
upload_result = response.json()
|
|
|
|
upload_result = response.json()
|
|
|
|
aro_path = upload_result.get("full_path")
|
|
|
|
aro_path = upload_result.get("full_path")
|
|
|
|
|