send appropriate responses to upload rpc calls
This commit is contained in:
4
rpc.js
4
rpc.js
@@ -635,7 +635,7 @@ var upload = function (Env, publicKey, content, cb) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (session.currentUploadSize > session.pendingUploadSize) {
|
if (session.currentUploadSize > session.pendingUploadSize) {
|
||||||
return cb('TOO_LARGE');
|
return cb('E_OVER_LIMIT');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!session.blobstage) {
|
if (!session.blobstage) {
|
||||||
@@ -739,7 +739,7 @@ var upload_status = function (Env, publicKey, filesize, cb) {
|
|||||||
|
|
||||||
getFreeSpace(Env, publicKey, function (e, free) {
|
getFreeSpace(Env, publicKey, function (e, free) {
|
||||||
if (e) { return void cb(e); }
|
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) {
|
isFile(filePath, function (e, yes) {
|
||||||
if (e) {
|
if (e) {
|
||||||
console.error("uploadError: [%s]", e);
|
console.error("uploadError: [%s]", e);
|
||||||
|
|||||||
Reference in New Issue
Block a user