If HttpStatus == 413, refresh media limits
parent
caf2086585
commit
736b76bbb0
|
@ -377,9 +377,9 @@ class ContentMessages {
|
|||
}
|
||||
}
|
||||
if (error) {
|
||||
dis.dispatch({action: 'upload_failed', upload: upload});
|
||||
dis.dispatch({action: 'upload_failed', upload, error});
|
||||
} else {
|
||||
dis.dispatch({action: 'upload_finished', upload: upload});
|
||||
dis.dispatch({action: 'upload_finished', upload});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -500,7 +500,10 @@ module.exports = React.createClass({
|
|||
break;
|
||||
case 'notifier_enabled':
|
||||
case 'upload_failed':
|
||||
this._fetchMediaLimits(true);
|
||||
// 413: File was too big or upset the server in some way.
|
||||
if(payload.data.error.http_status === 413) {
|
||||
this._fetchMediaLimits(true);
|
||||
}
|
||||
case 'upload_started':
|
||||
case 'upload_finished':
|
||||
this.forceUpdate();
|
||||
|
|
Loading…
Reference in New Issue