Merge branch 'master' into next

This commit is contained in:
Vladimir Gorej
2023-04-26 14:01:09 +02:00
5 changed files with 539 additions and 505 deletions

View File

@@ -59,11 +59,13 @@ export default class ResponseBody extends React.PureComponent {
url = url || ""
if (
/^application\/octet-stream/i.test(contentType) ||
(headers["Content-Disposition"] && (/attachment/i).test(headers["Content-Disposition"])) ||
(headers["content-disposition"] && (/attachment/i).test(headers["content-disposition"])) ||
(headers["Content-Description"] && (/File Transfer/i).test(headers["Content-Description"])) ||
(headers["content-description"] && (/File Transfer/i).test(headers["content-description"]))) {
(/^application\/octet-stream/i.test(contentType) ||
(headers["Content-Disposition"] && /attachment/i.test(headers["Content-Disposition"])) ||
(headers["content-disposition"] && /attachment/i.test(headers["content-disposition"])) ||
(headers["Content-Description"] && /File Transfer/i.test(headers["Content-Description"])) ||
(headers["content-description"] && /File Transfer/i.test(headers["content-description"]))) &&
content.size > 0
) {
// Download
if ("Blob" in window) {