You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-04 11:51:45 +03:00
Update comments and such
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -268,12 +268,12 @@ export default createReactClass({
|
|||||||
// will have the correct name when the user tries to download it.
|
// will have the correct name when the user tries to download it.
|
||||||
// We can't provide a Content-Disposition header like we would for HTTP.
|
// We can't provide a Content-Disposition header like we would for HTTP.
|
||||||
download: fileName,
|
download: fileName,
|
||||||
rel: "noopener",
|
|
||||||
target: "_blank",
|
|
||||||
textContent: _t("Download %(text)s", { text: text }),
|
textContent: _t("Download %(text)s", { text: text }),
|
||||||
}, "*");
|
}, "*");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const url = "usercontent/"; // XXX: this path should probably be passed from the skin
|
||||||
|
|
||||||
// If the attachment is encrypted then put the link inside an iframe.
|
// If the attachment is encrypted then put the link inside an iframe.
|
||||||
return (
|
return (
|
||||||
<span className="mx_MFileBody">
|
<span className="mx_MFileBody">
|
||||||
@@ -286,7 +286,11 @@ export default createReactClass({
|
|||||||
*/ }
|
*/ }
|
||||||
<a ref={this._dummyLink} />
|
<a ref={this._dummyLink} />
|
||||||
</div>
|
</div>
|
||||||
<iframe src="usercontent/" onLoad={onIframeLoad} ref={this._iframe} sandbox="allow-scripts allow-downloads" />
|
<iframe
|
||||||
|
src={`${url}?origin=${encodeURIComponent(window.location.origin)}`}
|
||||||
|
onLoad={onIframeLoad}
|
||||||
|
ref={this._iframe}
|
||||||
|
sandbox="allow-scripts allow-downloads" />
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user