mirror of
https://github.com/snailyp/gemini-balance.git
synced 2026-06-03 06:39:56 +08:00
feat: 支持CloudFlare图床自定义上传文件夹路径
- 新增CLOUDFLARE_IMGBED_UPLOAD_FOLDER环境变量配置 - 用户可通过该配置项指定图片在CloudFlare图床中的上传路径
This commit is contained in:
@@ -238,6 +238,7 @@ def _extract_image_data(part: dict) -> str:
|
||||
provider=settings.UPLOAD_PROVIDER,
|
||||
base_url=settings.CLOUDFLARE_IMGBED_URL,
|
||||
auth_code=settings.CLOUDFLARE_IMGBED_AUTH_CODE,
|
||||
upload_folder=settings.CLOUDFLARE_IMGBED_UPLOAD_FOLDER,
|
||||
)
|
||||
current_date = time.strftime("%Y/%m/%d")
|
||||
filename = f"{current_date}/{uuid.uuid4().hex[:8]}.png"
|
||||
|
||||
Reference in New Issue
Block a user