We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is my code
Images = new FS.Collection("images",{ stores: [new FS.Store.FileSystem("images")], filter:{ allow:{ contentTypes: ['image/*'] } } }); Images.allow({ insert: function(userId,doc){ return true; }, update:function(userId,doc){ return true; }, download: function(userId){ return true; } }); Posts = new Meteor.Collection('posts'); Posts.allow({ insert:function(userId,doc){ return true; }, update:function(userId,doc){ return true; } }); PostSchema = new SimpleSchema({ title:{ type: String, autoform:{ label:false, type:"textarea", placeholder:"Comparte con la comunidad" } }, pictures:{ type:[String], optional: true, label: " " }, 'pictures.$':{ autoform:{ type:"fileUpload", collection: 'images', selectFileBtnTemplate: 'mySelectFileBtn', previewTemplate: 'myFilePreview', uploadProgressTemplate: 'myUploadProgressTemplate' } }, author:{ type:String, label: "Author", autoValue: function(){ return this.userId }, autoform:{ type:"hidden" } }, createdAt:{ type: Date, label: "created At", autoValue:function(){ return new Date() }, autoform:{ type:"hidden" } } }); Posts.attachSchema(PostSchema);
`
<template name="Post"> <div class="card"> <div class="card-header"> Bryan zamora </div> <div class="card-block"> <p class="card-text">{{title}}</p> {{#each FS.GetFile "images" pictures}} <img src="{{this.name}}" alt="" class="card-img-bottom"> {{/each}} </div> </div> </template>
<template name="Posts"> {{> NewPost}} <div class="col-lg-6 col-lg-offset-3"> {{#each posts}} {{> Post}} {{/each}} </div> </template>
Meteor.publish("postAndImage",function(){ return[ Posts.find({author:this.userId}), Images.find({}) ] })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is my code
`
The text was updated successfully, but these errors were encountered: