我正在使用cfs:s3,之前我尝试使用cfs:dropbox来存储图像。当我在本地运行应用程序时,它工作正常,但当我在meteor.com上部署它时,它停止将图像上传到其中一个平台。
对此有任何已知问题?
var imageStore = new FS.Store.S3("playerProfilePictures", {
accessKeyId: "", //required if environment variables are not set
secretAccessKey: "", //required if environment variables are not set
bucket: "mohsinclubimages", //required
transformWrite: createThumb //optional
});
PlayerProfilePictures = new FS.Collection("playerProfilePictures", {
stores: [imageStore]
});
S3的政策
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets",
"s3:ListBucket"
],
"Resource": "arn:aws:s3:::*"
},
{
"Action": [
"s3:PutObject",
"s3:PutObjectAcl",
"s3:GetObject",
"s3:GetObjectAcl",
"s3:DeleteObject",
"s3:DeleteObjectAcl"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::mohsinclubimages/*"
]
}
]
}