直接拼接逻辑

This commit is contained in:
2025-01-11 17:25:58 +08:00
parent da6579a9ed
commit ce469dacf2
7 changed files with 191 additions and 21 deletions

View File

@ -1,7 +1,10 @@
import logging
import os
import requests
logger = logging.getLogger(__name__)
def upload_to_oss(url, file_path):
"""
@ -25,6 +28,7 @@ def download_from_oss(url, file_path):
:param Union[LiteralString, str, bytes] file_path: 文件路径
:return bool: 是否成功
"""
logging.info("download_from_oss: %s", url)
file_dir, file_name = os.path.split(file_path)
if file_dir:
if not os.path.exists(file_dir):