core&ui: bug fix

This commit is contained in:
undefined committed 2022-11-19 17:57:31 +08:00
1 parent 273a0563b3
commit 60820a3e5f
7 files changed
+15 -12

No files matched your search

@@ -135,7 +135,7 @@ export async function previewFile(ev, type = '') {
if (ext === 'pdf') return previewPDF(`${link}${link.includes('?') ? '&' : '?'}noDisposition=1`);
Notification.info(i18n('Loading file...'));
try {
const { url } = await request.get(link);
const { url } = await request.get(link, {}, { headers: { 'Do-Not-Cache': 'on' } });
if (/^(doc|xls|ppt)x?$/.test(ext)) return previewOffice(link, url);
content = await request.get(url, undefined, { dataType: 'text' });
} catch (e) {