bizydraft 0.2.63__py3-none-any.whl → 0.2.65__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of bizydraft might be problematic. Click here for more details.

bizydraft/hijack_nodes.py CHANGED
@@ -66,7 +66,15 @@ def get_data_load_classes_from_url(config_url):
66
66
  return []
67
67
 
68
68
 
69
- DATA_LOAD_CLASSES = []
69
+ DATA_LOAD_CLASSES = [
70
+ "LoadImage",
71
+ "LoadVideo",
72
+ "LoadImageMask",
73
+ "LoadAudio",
74
+ "Load3D",
75
+ "VHS_LoadAudioUpload",
76
+ "VHS_LoadVideo",
77
+ ]
70
78
 
71
79
  if COMFYAGENT_NODE_CONFIG.startswith("http"):
72
80
  fetched_classes = get_data_load_classes_from_url(COMFYAGENT_NODE_CONFIG)
@@ -50,7 +50,7 @@ async def view_image(request):
50
50
  try:
51
51
  if "http" in subfolder:
52
52
  subfolder = subfolder[subfolder.find("http") :]
53
- subfolder = unquote(subfolder)
53
+ subfolder = unquote(subfolder).replace("https:/", "https://")
54
54
  filename = (
55
55
  f"{subfolder}/{filename}"
56
56
  if not filename.startswith(http_prefix_options)
@@ -58,13 +58,19 @@ async def view_image(request):
58
58
  ) # preview 3d request: https://host:port/api/view?filename=filename.glb&type=output&subfolder=https://bizyair-dev.oss-cn-shanghai.aliyuncs.com/outputs&rand=0.5763957215362988
59
59
 
60
60
  content_type, _ = mimetypes.guess_type(filename)
61
- if content_type and any(x in content_type for x in ("image", "video")):
62
- return web.HTTPFound(filename)
63
61
 
64
62
  timeout = ClientTimeout(total=BIZYDRAFT_REQUEST_TIMEOUT)
65
63
  async with ClientSession(timeout=timeout) as session:
66
64
  async with session.get(filename) as resp:
67
65
  resp.raise_for_status()
66
+
67
+ # 优先使用服务器返回的Content-Type,如果无法获取则使用猜测的类型
68
+ final_content_type = (
69
+ resp.headers.get("Content-Type")
70
+ or content_type
71
+ or "application/octet-stream"
72
+ )
73
+
68
74
  content_length = int(resp.headers.get("Content-Length", 0))
69
75
  if content_length > BIZYDRAFT_MAX_FILE_SIZE:
70
76
  logger.warning(
@@ -77,7 +83,7 @@ async def view_image(request):
77
83
 
78
84
  headers = {
79
85
  "Content-Disposition": f'attachment; filename="{uuid.uuid4()}"',
80
- "Content-Type": "application/octet-stream",
86
+ "Content-Type": final_content_type,
81
87
  }
82
88
 
83
89
  proxy_response = web.StreamResponse(headers=headers)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bizydraft
3
- Version: 0.2.63
3
+ Version: 0.2.65
4
4
  Summary: bizydraft
5
5
  Requires-Dist: loguru
6
6
  Requires-Dist: aiohttp
@@ -1,10 +1,10 @@
1
1
  bizydraft/__init__.py,sha256=OM-sKCQrPh25nHVJIX-DgF1raMYyoWLSuyduIAHt0Gs,78
2
2
  bizydraft/block_nodes.py,sha256=Lqn3oSCaGDHR2OICc8a2iRoRCVVK9v1-9MM3r-qIZgA,1092
3
3
  bizydraft/env.py,sha256=VFmGopVL2TGWA6hwxyFhIglCEcQxy6iVvL_raMNd6u4,407
4
- bizydraft/hijack_nodes.py,sha256=i-HCZvEqCx25NhClM2wHHCBnBi4IYxuuAcRviVRFkcg,3331
4
+ bizydraft/hijack_nodes.py,sha256=flE0FH3pDUBAej5T3X-DiyLwxSz478OFC4ewcNLUBvM,3466
5
5
  bizydraft/hijack_routes.py,sha256=lf6x3xDzbo9yQIRwfG_1oxcUNfrX_1ogbiff3WOV9gM,3268
6
6
  bizydraft/oss_utils.py,sha256=FxTe9TxA9Q13pxKaOpcN0Jui-BG1SBWySM71PqpIlsM,8601
7
- bizydraft/patch_handlers.py,sha256=WPf4xeV5sBpoJ2MkHHhx0wem7B0KQNuhONElN7c9v3g,5989
7
+ bizydraft/patch_handlers.py,sha256=341y4YpzXOngQk9vLO8KLr7MXqAgM-_DrGrtIVGbPWo,6193
8
8
  bizydraft/postload.py,sha256=XFElKcmCajT_oO7SVJJBaN04XcWro54N5HB5cSCxfvI,1308
9
9
  bizydraft/prestartup_patch.py,sha256=4FGjmRcDHELjtlQOrfTfk2Un5OS89QIqfq-gEcB9WDs,998
10
10
  bizydraft/resp.py,sha256=8INvKOe5Dgai3peKfqKjrhUoYeuXWXn358w30-_cY-A,369
@@ -23,7 +23,7 @@ bizydraft/static/js/socket.js,sha256=VE3fTAgEfM0FZhL526Skt7OCRokOa3mzTCAjAomI_tE
23
23
  bizydraft/static/js/tool.js,sha256=VupamUuh7tYiDnBTrL5Z_yLmhJinskhzRXwE3zfsKZM,2901
24
24
  bizydraft/static/js/uploadFile.js,sha256=WvglKzHMeOzDhOH3P-fLcPHxCLbKOJpo4DntoRxeJtI,4908
25
25
  bizydraft/static/js/workflow_io.js,sha256=FWAjncvWhvy-3nN_legD2fpRwgnIncpRLHU5X016a-U,5236
26
- bizydraft-0.2.63.dist-info/METADATA,sha256=k1aofr7e1X1o9sL5PGa5kbNg8vVXVfLz7f0cDpTyCbM,162
27
- bizydraft-0.2.63.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
- bizydraft-0.2.63.dist-info/top_level.txt,sha256=XtoBq6hjZhXIM7aas4GtPDtAiKo8FdLzMABXW8qqQ8M,10
29
- bizydraft-0.2.63.dist-info/RECORD,,
26
+ bizydraft-0.2.65.dist-info/METADATA,sha256=C4ZX1SbyFzrB-6ABgnyvncqMI87fQqOAnJ-rtt8lSbM,162
27
+ bizydraft-0.2.65.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
+ bizydraft-0.2.65.dist-info/top_level.txt,sha256=XtoBq6hjZhXIM7aas4GtPDtAiKo8FdLzMABXW8qqQ8M,10
29
+ bizydraft-0.2.65.dist-info/RECORD,,