You've already forked FrameTour-RenderWorker
feat(storage): 添加上传日志记录功能
- 导入 urllib.parse.unquote 模块用于 URL 解码 - 在使用 rclone 上传时添加上传目标 URL 的日志记录 - 便于调试和监控文件上传过程
This commit is contained in:
@@ -9,6 +9,7 @@ import os
|
|||||||
import logging
|
import logging
|
||||||
import subprocess
|
import subprocess
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
from urllib.parse import unquote
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
@@ -85,6 +86,7 @@ def upload_file(url: str, file_path: str, max_retries: int = 5, timeout: int = 6
|
|||||||
|
|
||||||
# 检查是否使用 rclone 上传
|
# 检查是否使用 rclone 上传
|
||||||
if os.getenv("UPLOAD_METHOD") == "rclone":
|
if os.getenv("UPLOAD_METHOD") == "rclone":
|
||||||
|
logger.info(f"Uploading to: {url}")
|
||||||
result = _upload_with_rclone(url, file_path)
|
result = _upload_with_rclone(url, file_path)
|
||||||
if result:
|
if result:
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user