diff --git a/flytekit/types/file/file.py b/flytekit/types/file/file.py index 347dc81a25..c36e1bb32a 100644 --- a/flytekit/types/file/file.py +++ b/flytekit/types/file/file.py @@ -435,6 +435,8 @@ def to_literal( f" specified. Since a simpler type was specified, we'll skip uploading!" ) should_upload = False + if ctx.execution_state.is_local_execution: + should_upload = False # Set the remote destination if one was given instead of triggering a random one below remote_path = python_val.remote_path or None