support larger upload sizes for users with premium accounts

This commit is contained in:
ansuz
2020-02-26 13:09:11 -05:00
parent 87ef2b0899
commit 59ad80d7f1
4 changed files with 50 additions and 3 deletions

View File

@@ -158,10 +158,15 @@ define([
});
onError = function (e) {
// XXX if we included the max upload sizes in /api/config
// then we could check if a file is too large without going to the server...
queue.inProgress = false;
queue.next();
if (e === 'TOO_LARGE') {
$pv.text(Messages.upload_tooLargeBrief);
// XXX translate
// instead of "This file exceeds the maximum upload size"
// use "the maximum upload size allowed for your account"
return void UI.alert(Messages.upload_tooLarge);
}
if (e === 'NOT_ENOUGH_SPACE') {