You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
Don't send options we don't need to fetch
This commit is contained in:
@@ -401,12 +401,7 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
// Start a fetch for the download
|
// Start a fetch for the download
|
||||||
// Based upon https://stackoverflow.com/a/49500465
|
// Based upon https://stackoverflow.com/a/49500465
|
||||||
fetch(contentUrl, {
|
fetch(contentUrl).then((response) => response.blob()).then((blob) => {
|
||||||
headers: new Headers({
|
|
||||||
'Origin': window.location.origin,
|
|
||||||
}),
|
|
||||||
mode: 'cors',
|
|
||||||
}).then((response) => response.blob()).then((blob) => {
|
|
||||||
const blobUrl = URL.createObjectURL(blob);
|
const blobUrl = URL.createObjectURL(blob);
|
||||||
|
|
||||||
// We have to create an anchor to download the file
|
// We have to create an anchor to download the file
|
||||||
|
|||||||
Reference in New Issue
Block a user