ui: fix resource cache in dev mode

This commit is contained in:
undefined committed 2023-01-23 18:07:30 +08:00
1 parent d069fe127b
commit d20bf5b1e7
3 files changed
+3 -3

No files matched your search

@@ -133,7 +133,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, {}, { headers: { 'Do-Not-Cache': 'on' } });
const { url } = await request.get(link, {}, { headers: { Pragma: 'no-cache' } });
if (/^(doc|xls|ppt)x?$/.test(ext)) return previewOffice(link, url);
content = await request.get(url, undefined, { dataType: 'text' });
} catch (e) {