Merge pull request #3709 from ELE3E/master
Fixes #3694: Apply conditions for generating download link correctly
This commit is contained in:
@@ -49,10 +49,10 @@ export default class ResponseBody extends React.Component {
|
|||||||
// Download
|
// Download
|
||||||
} else if (
|
} else if (
|
||||||
/^application\/octet-stream/i.test(contentType) ||
|
/^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-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"])) ||
|
||||||
headers["content-description"] && (/File Transfer/i).test(headers["content-description"])) {
|
(headers["content-description"] && (/File Transfer/i).test(headers["content-description"]))) {
|
||||||
|
|
||||||
let contentLength = headers["content-length"] || headers["Content-Length"]
|
let contentLength = headers["content-length"] || headers["Content-Length"]
|
||||||
if ( !(+contentLength) ) return null
|
if ( !(+contentLength) ) return null
|
||||||
|
|||||||
Reference in New Issue
Block a user