Skip to content

Commit

Permalink
Merge branch 'feat/streaming_upload_support' of https://github.com/an…
Browse files Browse the repository at this point in the history
…sys/pyansys-geometry into feat/streaming_upload_support
  • Loading branch information
mlkaplan36 committed Mar 10, 2025
2 parents 9f2766a + 1ff650c commit 55cabb4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ansys/geometry/core/modeler.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,19 +425,19 @@ def open_file(
# Format-specific logic - upload the whole containing folder for assemblies
if upload_to_server:
fp_path = Path(file_path)
file_size_mb = file_path.stat().st_size / (1024*1024)
file_size_mb = file_path.stat().st_size / (1024 * 1024)
if any(
ext in str(file_path) for ext in [".CATProduct", ".asm", ".solution", ".sldasm"]
):
dir = fp_path.parent
for file in dir.iterdir():
full_path = file.resolve()
if full_path != fp_path:
if(file_size_mb < MAX_MESSAGE_LENGTH):
if file_size_mb < MAX_MESSAGE_LENGTH:
self._upload_file(full_path)
else:
self._upload_file_stream(full_path)
if(file_size_mb < MAX_MESSAGE_LENGTH):
if file_size_mb < MAX_MESSAGE_LENGTH:
self._upload_file(file_path, True, import_options)
else:
self._upload_file_stream(file_path, True, import_options)
Expand Down

0 comments on commit 55cabb4

Please sign in to comment.