Template.items.events({
'change .myFileInput': function (event, template) {
var files = event.target.files;
for (var i = 0, ln = files.length; i < ln; i++) {
var fileObj = Images.insert(files[i]);
Items.insert({
type: 'test',
image: fileObj._id
});
}
}
});
Template.item.helpers({
image: function () {
return Images.findOne(this.image)
}
});
@BlueXik I use 'stored' event (works at server side only):
Images.on('stored', function (file, storeName) {
Fiber(function () {
let url = file.url({store: storeName})
and file should be reactively update its urls after insert at client side:
Images.insert(newFile, (error, file) => {
// file.url({store: 'youStoreName'})
hey guys, is there a way of listing all the contents of a database of my app?
I have been building an app, all static. Haven’t created a single collection,
but I’m using some packages that I’m pretty sure are creating collections.
When I remove autopublish and deploy, the app crashes.
Do I need to set up subscriptions and publications manually for packages that use collections?
Hi guys!
Can someone help with custom filters of reactive-table
package.
I want to filter according to date
My date get's stored in db in format as "2016-02-18T00:00:00.000Z"
but when I query my collection, I receive the result in following format Thu Feb 18 2016 05:30:00 GMT+0530 (IST)
I want to create a custom filter and use $lte
and $gte
to get my desired docs in the table. But whenever I pass in any of above format, table renders nothing!!
How to solve this issue?