url can & should be constructed during read
This commit is contained in:
@@ -743,7 +743,7 @@ function getObjectType(obj) {
|
|||||||
case 'File' :
|
case 'File' :
|
||||||
if(obj.url && obj.name) {
|
if(obj.url && obj.name) {
|
||||||
return 'file';
|
return 'file';
|
||||||
} else {
|
} else if(!obj.url){
|
||||||
let msg = obj.name? JSON.stringify(obj) + " is not a valid File" : "File has no name";
|
let msg = obj.name? JSON.stringify(obj) + " is not a valid File" : "File has no name";
|
||||||
throw new Parse.Error(Parse.Error.INCORRECT_TYPE, msg);
|
throw new Parse.Error(Parse.Error.INCORRECT_TYPE, msg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user