Can I add an object to Meteor.settings to be used in packages?


#1

I have a package where I need to upload images, I would like to do this with cfs. Right now I’ve put my s3 keys in the Settings.json file (in my main app). Like this:

AntoBaseImages = new FS.Collection("antobase.images", {
    stores: [
        new FS.Store.S3("antobase_images", {
            region: Meteor.settings.antobase.svgeditor.images.normal.region,
            accessKeyId: Meteor.settings.antobase.svgeditor.images.normal.accessKeyId,
            secretAccessKey: Meteor.settings.antobase.svgeditor.images.normal.secretAccessKey,
            bucket: Meteor.settings.antobase.svgeditor.images.normal.bucket,
            ACL: Meteor.settings.antobase.svgeditor.images.normal.ACL,
            folder: Meteor.settings.antobase.svgeditor.images.normal.folder
        }),
        new FS.Store.S3("antobase_images_thumbs", {
            region: Meteor.settings.antobase.svgeditor.images.thumb.region,
            accessKeyId: Meteor.settings.antobase.svgeditor.images.thumb.accessKeyId,
            secretAccessKey: Meteor.settings.antobase.svgeditor.images.thumb.secretAccessKey,
            bucket: Meteor.settings.antobase.svgeditor.images.thumb.bucket,
            ACL: Meteor.settings.antobase.svgeditor.images.thumb.ACL,
            folder: Meteor.settings.antobase.svgeditor.images.thumb.folder,
            transformWrite: function(fileObj, readStream, writeStream) {
                gm(readStream, fileObj.name()).resize('500', '500').stream().pipe(writeStream);
            }
        })
    ]
});

Is there a way I can send a more generic ‘store’ object to the package? What is the best approach here?
Instead I would like to do something like this:

AntoBaseImages = new FS.Collection("antobase.images", {
    stores: [
        Meteor.settings.antobase.svgeditor.images.store.normal
        Meteor.settings.antobase.svgeditor.images.store.thumb)
    ]
});

(or is this something that fits on stack overflow better?)