Meteor lepozepo:s3,带多个桶
我目前正在开发一个需要上传和删除文件的应用程序。我终于能够设置lepozepo:s3包,从我的AWS bucket上传和删除文件,并且运行良好。但是,我总共有4个bucket,包允许我只为一个bucket配置它。我看到upload函数有覆盖bucket的选项,但我看不到delete函数的任何操作 我现在就是这样做的:Meteor lepozepo:s3,带多个桶,meteor,amazon-s3,Meteor,Amazon S3,我目前正在开发一个需要上传和删除文件的应用程序。我终于能够设置lepozepo:s3包,从我的AWS bucket上传和删除文件,并且运行良好。但是,我总共有4个bucket,包允许我只为一个bucket配置它。我看到upload函数有覆盖bucket的选项,但我看不到delete函数的任何操作 我现在就是这样做的: Template.postSubmit.events({ "change .file_bag": function(){ var files = $("in
Template.postSubmit.events({
"change .file_bag": function(){
var files = $("input.file_bag")[0].files
S3.upload({
files:files,
path:"images"
},function(e,r){
console.log(r);
});
},
"click button.delete": function(){
//TODO make more secure by using meteor methods
S3.delete(this.relative_url, function(e,r){
console.log(r);
});
S3.collection.remove(this._id);
}
})
Template.postSubmit.helpers({
"files": function(){
return S3.collection.find();
}
})
关于如何解决这个问题或我不知道的任何方案,有什么建议吗