Skip to content

Commit 0a17a7f

Browse files
passing the path
1 parent 8f71a46 commit 0a17a7f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/ansys/geometry/core/_grpc/_services/v1/designs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ class GRPCDesignsServiceV1(GRPCDesignsService): # pragma: no cover
4444
@protect_grpc
4545
def __init__(self, channel: grpc.Channel): # noqa: D102
4646
from ansys.api.discovery.v1.design.designdoc_pb2_grpc import DesignDocStub
47+
from ansys.api.discovery.v1.commands.file_pb2_grpc import FileStub
4748

4849
self.stub = DesignDocStub(channel)
50+
self.file_stub = FileStub(channel)
4951

5052
@protect_grpc
5153
def open(self, **kwargs) -> dict: # noqa: D102
@@ -119,7 +121,7 @@ def request_generator(
119121

120122

121123
# Call the gRPC service
122-
response = self.commands_stub.UploadFile(request_generator(
124+
response = self.file_stub.Open(request_generator(
123125
file_path=kwargs["file_path"],
124126
open_file=kwargs["open_file"],
125127
import_options=kwargs["import_options"],

src/ansys/geometry/core/modeler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ def _upload_file(
297297

298298
response = self.client.services.designs.upload_file(
299299
data=data,
300+
file_path=str(fp_path),
300301
file_name=file_name,
301302
open_file=open_file,
302303
import_options=import_options,

0 commit comments

Comments
 (0)