From 885b69233a8e922316ef17101d7e5bc025a6367b Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Sat, 24 Jan 2026 23:29:37 +0800 Subject: [PATCH] =?UTF-8?q?feat(storage):=20=E6=B7=BB=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 导入 urllib.parse.unquote 模块用于 URL 解码 - 在使用 rclone 上传时添加上传目标 URL 的日志记录 - 便于调试和监控文件上传过程 --- services/storage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/storage.py b/services/storage.py index 6cd9b22..571a1e7 100644 --- a/services/storage.py +++ b/services/storage.py @@ -9,6 +9,7 @@ import os import logging import subprocess from typing import Optional +from urllib.parse import unquote import requests @@ -85,6 +86,7 @@ def upload_file(url: str, file_path: str, max_retries: int = 5, timeout: int = 6 # 检查是否使用 rclone 上传 if os.getenv("UPLOAD_METHOD") == "rclone": + logger.info(f"Uploading to: {url}") result = _upload_with_rclone(url, file_path) if result: return True