File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
packages/simcore-sdk/src/simcore_sdk/node_ports_v2
services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -320,14 +320,19 @@ async def _set(
320320
321321 _check_if_symlink_is_valid (converted_value )
322322
323+ # NOTE: the file will be saved in S3 as PROJECT_ID/NODE_ID/(set_kwargs.file_base_path)/PORT_KEY/file.ext
324+ base_path = Path (self .key )
325+ if set_kwargs and set_kwargs .file_base_path :
326+ base_path = set_kwargs .file_base_path / self .key
327+
323328 new_value = await port_utils .push_file_to_store (
324329 file = converted_value ,
325330 user_id = self ._node_ports .user_id ,
326331 project_id = self ._node_ports .project_id ,
327332 node_id = self ._node_ports .node_uuid ,
328333 r_clone_settings = self ._node_ports .r_clone_settings ,
329334 io_log_redirect_cb = self ._node_ports .io_log_redirect_cb ,
330- file_base_path = set_kwargs . file_base_path if set_kwargs else None ,
335+ file_base_path = base_path ,
331336 )
332337 else :
333338 new_value = converted_value
Original file line number Diff line number Diff line change @@ -117,7 +117,9 @@ async def upload_outputs(
117117 ports_values [port .key ] = (
118118 files_and_folders_list [0 ],
119119 SetKWargs (
120- file_base_path = (src_folder .relative_to (outputs_path .parent ))
120+ file_base_path = (
121+ src_folder .parent .relative_to (outputs_path .parent )
122+ )
121123 ),
122124 )
123125 continue
@@ -142,7 +144,9 @@ async def upload_outputs(
142144 ports_values [port .key ] = (
143145 tmp_file ,
144146 SetKWargs (
145- file_base_path = (src_folder .relative_to (outputs_path .parent ))
147+ file_base_path = (
148+ src_folder .parent .relative_to (outputs_path .parent )
149+ )
146150 ),
147151 )
148152 else :
You can’t perform that action at this time.
0 commit comments