fix: remove outdated Safari check for Blob downloads (#4541)
This commit is contained in:
@@ -64,9 +64,7 @@ export default class ResponseBody extends React.PureComponent {
|
|||||||
(headers["content-description"] && (/File Transfer/i).test(headers["content-description"]))) {
|
(headers["content-description"] && (/File Transfer/i).test(headers["content-description"]))) {
|
||||||
// Download
|
// Download
|
||||||
|
|
||||||
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)
|
if ("Blob" in window) {
|
||||||
|
|
||||||
if (!isSafari && "Blob" in window) {
|
|
||||||
let type = contentType || "text/html"
|
let type = contentType || "text/html"
|
||||||
let blob = (content instanceof Blob) ? content : new Blob([content], {type: type})
|
let blob = (content instanceof Blob) ? content : new Blob([content], {type: type})
|
||||||
let href = window.URL.createObjectURL(blob)
|
let href = window.URL.createObjectURL(blob)
|
||||||
|
|||||||
Reference in New Issue
Block a user