send appropriate responses to upload rpc calls
This commit is contained in:
parent
d71e12713a
commit
d9f128e923
1 changed files with 2 additions and 2 deletions
4
rpc.js
4
rpc.js
|
@ -635,7 +635,7 @@ var upload = function (Env, publicKey, content, cb) {
|
|||
}
|
||||
|
||||
if (session.currentUploadSize > session.pendingUploadSize) {
|
||||
return cb('TOO_LARGE');
|
||||
return cb('E_OVER_LIMIT');
|
||||
}
|
||||
|
||||
if (!session.blobstage) {
|
||||
|
@ -739,7 +739,7 @@ var upload_status = function (Env, publicKey, filesize, cb) {
|
|||
|
||||
getFreeSpace(Env, publicKey, function (e, free) {
|
||||
if (e) { return void cb(e); }
|
||||
if (filesize >= free) { return cb('TOO_LARGE'); }
|
||||
if (filesize >= free) { return cb('NOT_ENOUGH_SPACE'); }
|
||||
isFile(filePath, function (e, yes) {
|
||||
if (e) {
|
||||
console.error("uploadError: [%s]", e);
|
||||
|
|
Loading…
Reference in a new issue