You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
If HttpStatus == 413, refresh media limits
This commit is contained in:
@@ -377,9 +377,9 @@ class ContentMessages {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (error) {
|
if (error) {
|
||||||
dis.dispatch({action: 'upload_failed', upload: upload});
|
dis.dispatch({action: 'upload_failed', upload, error});
|
||||||
} else {
|
} else {
|
||||||
dis.dispatch({action: 'upload_finished', upload: upload});
|
dis.dispatch({action: 'upload_finished', upload});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -500,7 +500,10 @@ module.exports = React.createClass({
|
|||||||
break;
|
break;
|
||||||
case 'notifier_enabled':
|
case 'notifier_enabled':
|
||||||
case 'upload_failed':
|
case 'upload_failed':
|
||||||
|
// 413: File was too big or upset the server in some way.
|
||||||
|
if(payload.data.error.http_status === 413) {
|
||||||
this._fetchMediaLimits(true);
|
this._fetchMediaLimits(true);
|
||||||
|
}
|
||||||
case 'upload_started':
|
case 'upload_started':
|
||||||
case 'upload_finished':
|
case 'upload_finished':
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
|
|||||||
Reference in New Issue
Block a user