Skip to content
This repository has been archived by the owner on Mar 25, 2020. It is now read-only.

How to subscribe cfs-files #61

Open
jaganreddy opened this issue Jun 14, 2017 · 0 comments
Open

How to subscribe cfs-files #61

jaganreddy opened this issue Jun 14, 2017 · 0 comments

Comments

@jaganreddy
Copy link

I defined in Ads schema

images: {
    type: [String],
    optional: true,
    label: "Pictures",
    autoform: {
      afFieldInput: {
        type: "cfs-files",
        collection: "images"
      }
    }
  },

At server publish

new Meteor.Pagination(Ads,{
	transform_options: function (filters, options) {
        const fields = { "images":1,"adlocation":1,"title":1,"slug":1 }
        options.fields = _.extend(fields, options.fields);
        return options;
    }
});

at client side subscription

this.pagination = new Meteor.Pagination(Ads, {
  	sort: {
    				_id: -1
        	},
		perPage: 1,
		filters:conditions,
		fields:{"images":1,"adlocation":1,"title":1,"slug":1}
  });

How to subscribe images based on Ads pagination.

Regards,
Jagan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant