From dd6c439eb38b07e0faa6942e5bfde8e235b8610e Mon Sep 17 00:00:00 2001 From: yuyx <237899745@qq.com> Date: Tue, 17 Feb 2026 19:29:42 +0800 Subject: [PATCH] fix: fallback to file icon when thumbnail load fails --- frontend/app.html | 6 ++++-- frontend/app.js | 33 ++++++++++++++++++++++++++++++--- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/frontend/app.html b/frontend/app.html index cd2992e..68a10bf 100644 --- a/frontend/app.html +++ b/frontend/app.html @@ -1693,9 +1693,10 @@
-
-
= 0) { + if (downloadQuota === 0 || downloadUsed >= downloadQuota) { + return null; + } + } + // 本地存储模式:返回同步的下载 URL // OSS 模式下缩略图功能暂不支持(需要预签名 URL,建议点击文件预览) if (this.storageType !== 'oss') { - const filePath = this.currentPath === '/' - ? `/${file.name}` - : `${this.currentPath}/${file.name}`; + const filePath = this.getCurrentFilePath(file); return `${this.apiBase}/api/files/download?path=${encodeURIComponent(filePath)}`; }