fix: force OSS direct download even when traffic quota is enabled
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user