mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix resource cache in dev mode
This commit is contained in:
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) {
|
||||
|
||||
Reference in new issue
Block a user