Fix types and precompute blob sizes to avoid overflows

This commit is contained in:
Jaiwanth 2021-07-19 13:17:19 +05:30
parent ed93bf4c77
commit f07402d234
5 changed files with 31 additions and 21 deletions

View file

@ -179,7 +179,7 @@ export default class MImageBody extends React.Component<IProps, IState> {
};
protected getContentUrl(): string {
const content = this.props.mxEvent.getContent();
const content: IMediaEventContent= this.props.mxEvent.getContent();
if (this.props.forExport) return content.url || content.file.url;
const media = mediaFromContent(content);
if (media.isEncrypted) {