javascript - Showing multiple stores with collectionFS -



javascript - Showing multiple stores with collectionFS -

do know how show specific store? have 2 stores.

i using bundle cfs-ejson store image in field in collection via imageobj field

var imagestore = new fs.store.s3("mains", { accesskeyid: "xxxxxxx", secretaccesskey: "xxxxxxx", bucket: "xxxxxxx", transformwrite: function(fileobj, readstream, writestream) { gm(readstream, fileobj.name()).resize('500', '500').stream().pipe(writestream); } }); var thumbstore = new fs.store.s3("thumbs", { accesskeyid: "xxxxxxx", secretaccesskey: "xxxxxxx", bucket: "xxxxxxx", transformwrite: function(fileobj, readstream, writestream) { gm(readstream, fileobj.name()).resize('100', '100').stream().pipe(writestream); } }); images = new fs.collection("images", { stores: [imagestore, thumbstore] });

i have tried access main version via {{ photo.url store="mains" }} thumbnail version.

it seems saving 1 image in s3 bucket, maybe need set thumbnail have different filename?

you can add together (undocumented right now) folder parameter storage options.

new fs.store.s3("thumbs", { bucket: "xxxxxxx", folder: "thumbs" }

this appended path before file key.

otherwise race status on file save, thats why thumbnail version if specify "mains".

javascript jquery meteor graphicsmagick

Comments

Popular posts from this blog

ruby on rails - Devise Logout Error in RoR -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

model view controller - MVC Rails Planning -