From 0b73bba28e2a8473ab71f5c8b4760c1995ff4fc1 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 21 十月 2025 18:29:07 +0800
Subject: [PATCH] fix: s
---
src/utils/common/download.ts | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/src/utils/common/download.ts b/src/utils/common/download.ts
index e9bf8f1..961ea6c 100644
--- a/src/utils/common/download.ts
+++ b/src/utils/common/download.ts
@@ -1,5 +1,5 @@
import { format } from '@/utils';
-import { BoleRegExp, FILEMIME } from '@bole-core/core';
+import { BoleRegExp, FILEMIME, downloadFileByUrl as _downloadFileByUrl } from '@bole-core/core';
import { saveAs } from 'file-saver';
import JSZip from 'jszip';
@@ -29,18 +29,9 @@
}
}
-export function downloadFileByUrl(fileUrl, fileName?: string) {
- //const suffix = /\.([0-9a-z]+)(?:[\?#]|$)/i.exec(fileUrl)[1];
- const suffix = /\.([0-9a-z]+)(?:[#]|$)/i.exec(fileUrl)[1];
- let name = fileName ? fileName : fileUrl.replace(BoleRegExp.RegFileName, '$2');
- name += `.${suffix}`;
- saveAs(fileUrl, name);
+export function downloadFileByUrl(fileUrl: string, fileName?: string) {
+ _downloadFileByUrl(fileUrl, fileName);
return;
- // if (/pdf/gi.test(suffix)) {
- // handlePdfLink(fileUrl, name);
- // } else {
- // handleFileDownload(fileUrl, name);
- // }
}
export const handleFileSaver = (file, name) => {
saveAs(file, name);
--
Gitblit v1.9.1