0
我正在使用基于JavaScript的AWS API上载和显示文档。 这是一个SAPUI5应用程序,在桌面浏览器中都可以正常工作。AWS s3.listobjects未响应科尔多瓦的最新信息APP
现在使用cordova我们生成了一个IOS应用程序,在这里我们可以成功上传一个文件到AWS,但是当我打电话给s3.listobjects时,我没有得到更新的列表作为响应(例如最初我有3个图像在一个文件夹,然后我上传一个新的并再次调用listobjects,但我仍然只有3个文件从响应)。同时我从桌面版本检查应用程序,它显示最新列表。
这里是我的例子代码。
/*
getAWSAttachments:function(vController, folder) {
var s3 = new AWS.S3();
var params = {
Bucket: vController.folder, /* required */
Prefix:faultId,
EncodingType: 'url'
};
s3.listObjects(params, function(err, data) {
if (err) {
console.log(err, err.stack);
} else{
console.log(data);
}
});
},
s3.putObject(params2, function (err, res) {
if (err) {
console.log("Error uUploading the file", err);
} else {
vController.getAWSAttachment(vController, vController.faultId);
}
});
//before calling the above methods I config AWS as below in inti of the view
AWS.config.update({
accessKeyId: this.getOwnerComponent().getModel("awsmodel").oData.AccessKey,
secretAccessKey: this.getOwnerComponent().getModel("awsmodel").oData.SecretKey,
signatureCache:true,
sslEnabled:true,
correctClockSkew:true,
httpOptions:{xhrAsync:false}
});
*/
不知道如果在应用程序的浏览器外壳的任何问题或科尔多瓦的应用程序是有导致此高速缓存参数。
在发布之前,我已经走过了科尔多瓦AWS插件,但正如我看到的例子,它使用相同的方法,所以不知道这是否会解决问题。