bill 4 ماه پیش
والد
کامیت
f93a20c0fa
1فایلهای تغییر یافته به همراه7 افزوده شده و 6 حذف شده
  1. 7 6
      src/util/file-serve.ts

+ 7 - 6
src/util/file-serve.ts

@@ -88,6 +88,7 @@ type SaveAs = (
 export const saveAs: SaveAs =
   "download" in HTMLAnchorElement.prototype && !isMacOSWebView
     ? (blob, name = "download", opts) => {
+        debugger;
         const URL = global.URL || global.webkitURL;
         const a = document.createElement("a");
 
@@ -96,12 +97,12 @@ export const saveAs: SaveAs =
 
         if (typeof blob === "string") {
           a.href = blob;
-          if (a.origin !== location.origin) {
-            if (corsEnabled(a.href)) {
-              return download(blob, name, opts);
-            }
-            a.target = "_blank";
-          }
+          // if (a.origin !== location.origin) {
+          //   if (corsEnabled(a.href)) {
+          //     return download(blob, name, opts);
+          //   }
+          //   a.target = "_blank";
+          // }
           return click(a);
         } else {
           a.href = URL.createObjectURL(blob);