Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望预览失效能够直接下载文件 #86

Open
CHN-STUDENT opened this issue Jan 17, 2025 · 1 comment
Open

希望预览失效能够直接下载文件 #86

CHN-STUDENT opened this issue Jan 17, 2025 · 1 comment

Comments

@CHN-STUDENT
Copy link

RT,大概这样,可惜我得java环境坏了,不好调试了。。

switch (fileType) {
		case 'video': openVideo(); break;
		case 'image': openImage(row); break;
		case 'text': openText(); break;
		case 'audio': openAudio(row); break;
		case 'office':
				// 增加判断,如果 onlyOfficeUrl 为空,则作为普通文件下载
				console.log("office预览地址:",`${storageConfigStore.globalConfig.onlyOfficeUrl}`)
				if (storageConfigStore.globalConfig.onlyOfficeUrl) {
						openOffice(row);
				} else {
						batchDownloadFile(row);
				}
				break;
		case 'pdf': openPdf(row); break;
		case 'three3d': open3d(row); break;
		default: batchDownloadFile(row);
}
@zhaojun1998
Copy link
Collaborator

zhaojun1998 commented Jan 17, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants