update file_upload
This commit is contained in:
@@ -192,7 +192,7 @@ def resolve_dependencies(prompt, custom_dependencies): # resolve custom nodes an
|
||||
|
||||
# step 3: handle local files
|
||||
process_local_file_path_async(file_mapping_dict, max_workers=20)
|
||||
files_dict = {v[0]: {"filename": v[2], "urls": [v[1]]} for v in file_mapping_dict.values()}
|
||||
files_dict = {v[0]: {"filename": os.path.relpath(v[2], BASE_PATH), "urls": [v[1]]} for v in file_mapping_dict.values()}
|
||||
|
||||
results = {
|
||||
"comfyui_version": comfyui_version,
|
||||
|
||||
+8
-4
@@ -3,6 +3,7 @@ import os
|
||||
import requests
|
||||
import time
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
import folder_paths
|
||||
|
||||
from .utils import compute_sha256
|
||||
|
||||
@@ -59,13 +60,16 @@ def upload_file_to_myshell(local_file: str) -> str:
|
||||
|
||||
|
||||
def collect_local_file(item, mapping_dict={}):
|
||||
input_dir = folder_paths.get_input_directory()
|
||||
if not isinstance(item, str):
|
||||
return
|
||||
abspath = os.path.abspath(item)
|
||||
input_abspath = os.path.join(input_dir, item)
|
||||
# required file type
|
||||
if os.path.isfile(item):
|
||||
fpath = item
|
||||
elif os.path.isfile(f"input/{item}"):
|
||||
fpath = f"input/{item}"
|
||||
if os.path.isfile(abspath):
|
||||
fpath = abspath
|
||||
elif os.path.isfile(input_abspath):
|
||||
fpath = input_abspath
|
||||
else:
|
||||
fpath = None
|
||||
if fpath is not None:
|
||||
|
||||
Reference in New Issue
Block a user