我看到了很多关于如何将文件上传到 S3 的文档,但我的问题有点相反。我有一个流星应用程序,并collectionFS
在其中进行了设置。现在我有一个 S3 存储桶,其中包含我应用程序中每个文档的标题图像。我如何为单个文档引用它?(如果有帮助,slug
每个文档的 都对应slug.jpg
于存储桶中的图像标题)。
到目前为止我有
var imageStore = new FS.Store.S3("careerImages", {
// region: "my-s3-region", //optional in most cases
accessKeyId: "my-value", //required if environment variables are not set
secretAccessKey: "my-value", //required if environment variables are not set
bucket: "ryf2.5", //required
// ACL: "myValue", //optional, default is 'private', but you can allow public or secure access routed through your app URL
folder: "header_images", //optional, which folder (key prefix) in the bucket to use
// The rest are generic store options supported by all storage adapters
// transformWrite: myTransformWriteFunction, //optional
// transformRead: myTransformReadFunction, //optional
// maxTries: 1 //optional, default 5
});
CareerImages = new FS.Collection("careerImages", {
stores: [imageStore]
});
现在我只想想办法在我的模板中显示它们。