JSSDK,包括云引擎的Node js和前端JSSDK,拿到的记录里File对象会变成Object对象,没有File相关方法,譬如thumbnailURL。
现象描述:
正常query出来的类型是没问题的,但是云引擎里的afterSave和LiveQuery里fetch出来的AV.File都会变成AV.Object
附上云引擎的一个报错。
rawMessage: 'Invalid value type for field \'image\',expect type is {:type "File"},but it is \'{:type "Object"}\'.' } } reason: Error: Invalid value type for field 'image',expect type is {:type "File"},but it is '{:type "Object"}'. [400 POST https://aqfd46kt.api.lncld.net/1.1/classes/UserSessions]
at /Users/yy/workspace/xposed/wx-web-bg/node_modules/leancloud-storage/dist/node/request.js:163:17
at tryCatch (/Users/yy/workspace/xposed/wx-web-bg/node_modules/es6-promise/dist/es6-promise.js:410:12)
at invokeCallback (/Users/yy/workspace/xposed/wx-web-bg/node_modules/es6-promise/dist/es6-promise.js:425:13)
at publish (/Users/yy/workspace/xposed/wx-web-bg/node_modules/es6-promise/dist/es6-promise.js:399:7)
at publishRejection (/Users/yy/workspace/xposed/wx-web-bg/node_modules/es6-promise/dist/es6-promise.js:340:3)
at flush (/Users/yy/workspace/xposed/wx-web-bg/node_modules/es6-promise/dist/es6-promise.js:128:5)
at combinedTickCallback (internal/process/nexttick.js:131:7)
at process.tickCallback (internal/process/nexttick.js:180:9)