mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-06 19:42:34 +08:00
Fixed resolve_asset_content_for_download accessing asset outside of session with statement
This commit is contained in:
parent
2aafb71388
commit
25f83d7401
@ -159,9 +159,9 @@ def resolve_asset_content_for_download(
|
|||||||
touch_asset_info_by_id(session, asset_info_id=asset_info_id)
|
touch_asset_info_by_id(session, asset_info_id=asset_info_id)
|
||||||
session.commit()
|
session.commit()
|
||||||
|
|
||||||
ctype = asset.mime_type or mimetypes.guess_type(info.name or abs_path)[0] or "application/octet-stream"
|
ctype = asset.mime_type or mimetypes.guess_type(info.name or abs_path)[0] or "application/octet-stream"
|
||||||
download_name = info.name or os.path.basename(abs_path)
|
download_name = info.name or os.path.basename(abs_path)
|
||||||
return abs_path, ctype, download_name
|
return abs_path, ctype, download_name
|
||||||
|
|
||||||
|
|
||||||
def upload_asset_from_temp_path(
|
def upload_asset_from_temp_path(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user