fix: force OSS direct download even when traffic quota is enabled

This commit is contained in:
2026-02-17 17:40:55 +08:00
parent 3a22b88f23
commit b171b41599
2 changed files with 156 additions and 17 deletions

View File

@@ -1549,12 +1549,10 @@ handleDragLeave(e) {
// 构建文件路径
const filePath = this.currentPath === '/' ? `/${file.name}` : `${this.currentPath}/${file.name}`;
const hasDownloadTrafficLimit = Number(this.user?.download_traffic_quota || 0) > 0;
const canDirectOssDownload = this.storageType === 'oss'
&& this.user?.oss_config_source !== 'none'
&& !hasDownloadTrafficLimit;
&& this.user?.oss_config_source !== 'none';
// OSS 且未启用下载限流:优先使用 OSS 直连下载(速度更快
// OSS 下载优先使用直连(避免服务器中转导致带宽与费用双重损耗
if (canDirectOssDownload) {
const directResult = await this.downloadFromOSS(filePath);
if (directResult) {