Update s3_upload_string_node.py

This commit is contained in:
Inoland
2025-10-14 10:48:24 +04:00
parent 8b8cb16ee7
commit cf77e8227d
@@ -39,6 +39,16 @@ class InoS3UploadString:
if not execute:
return (string, False, "", "", "", )
if isinstance(file_name, list):
if len(file_name) == 1:
file_name = str(file_name[0])
else:
return (string, False, "", "", "", )
elif isinstance(file_name, str):
pass
else:
return (string, False, "", "", "", )
validate_s3_config = S3Helper.validate_s3_config(s3_config)
if not validate_s3_config["success"]:
return (string,False, "", "", "", )
@@ -54,9 +64,6 @@ class InoS3UploadString:
full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(file_name, parent_path, 0, 0)
if date_time_as_name:
file_name = datetime.now().strftime("%Y%m%d%H%M%S")
filename_with_batch_num = filename.replace("%batch_num%", "0")
file = f"{filename_with_batch_num}_{counter:05}_.{save_as}"
full_path = os.path.join(full_output_folder, file)