|
楼主 |
发表于 2017-11-3 15:17:29
|
显示全部楼层
本帖最后由 developerML 于 2017-11-3 15:44 编辑
麻烦帮我看看下面代码
在app运行,ft.upload方法alert uploadImage:fail, {"code":null,"source":null,"target":null,"http_status":null,"body":null,"exception":null}
是什么意思
Model.prototype.button5Click = function(event){
var data = this.comp("fileData0");
var filepath = data.val("filePath"); //file:///storage/emulated/0/Android/data/..../cache/111.jpg
var storeFileName = justep.UUID.createUUID();
var filename = data.val("fileName"); //111.jpg
var successCallback = function(msg) {
alert("uploadImagek, " + JSON.stringify(msg));
};
var failCallback = function(msg) {
alert("uploadImage:fail, " + JSON.stringify(msg));
};
var ft = new FileTransfer();
ft.upload(filepath, encodeURI("/baas/x5/attachment/SimpleFileStore?ownerID=test&storeFileName=" & filename), successCallback, failCallback);
|
|