Skip to content
Snippets Groups Projects
Commit 4c2fe55f authored by David Baker's avatar David Baker
Browse files

Don't show the error dialog if the request was canceled. Handle 'request entity too large'.

parent e8f5131e
No related branches found
No related tags found
No related merge requests found
......@@ -108,11 +108,17 @@ class ContentMessages {
return matrixClient.sendMessage(roomId, content);
}, function(err) {
dis.dispatch({action: 'upload_failed', upload: upload});
if (!upload.canceled) {
var desc = "The file '"+upload.fileName+"' failed to upload.";
if (err.http_status == 413) {
desc = "The file '"+upload.fileName+"' exceeds this home server's size limit for uploads";
}
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
title: "Upload Failed",
description: "The file '"+upload.fileName+"' failed to upload."
description: desc
});
}
}).finally(function() {
var inprogressKeys = Object.keys(self.inprogress);
for (var i = 0; i < self.inprogress.length; ++i) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment