meteor

Totally confused about this.next() in Meteor iron-router

孤人 提交于 2019-12-23 07:49:01
问题 I upgraded to Meteor 1.0, installed the latest iron-router package, tried to run my app and got this nice warning in my console log: Route dispatch never rendered. Did you forget to call this.next() in an onBeforeAction? So I tried to modify my routes according to the new version. this.route('gamePage', { path: '/game/:slug/', onBeforeAction: [function() { this.subscribe('singlePlayer', this.params.slug).wait(); var singlePlayer = this.data(); if (singlePlayer) { if (singlePlayer.upgrade) {

Meteor 1.3+ Accounts Facebook Login for iOS not working

做~自己de王妃 提交于 2019-12-23 06:50:09
问题 I have been trying to find a solution (sadly for 3 months now) to login with Facebook using Meteors Accounts Facebook on iOS. I have tried just about everything a Google search will come up with, reached out on the Meteor forums and even opened up a Github issue. But this problem still escapes me. Everything works fine on desktop but as soon I as I test on mobile I get a Facebook error "Not Logged in. You are not logged in. Please login and try again" . I have found several others with this

make meteor restful api/web-service

耗尽温柔 提交于 2019-12-23 05:50:18
问题 I have created a new url/route in my app where I need to write a web-service. I need to write a service that deletes user according to the parameters passed in the service. For now, anyone should be able to call that service (will make it secure at later stage). App is built on meteor. My url is : loaclhost:3000/deleteUser. Now one should be able to call my delete user function defined on this page and pass json structure data as an argument to it. If the data is valid, then the user should

How do I create a meteor topic that is for server-only security sensitive information (client cannot subscribe)?

会有一股神秘感。 提交于 2019-12-23 05:49:08
问题 The meteor pub/sub mechanism is excellent way to share information across packages on the server without having to share package implementation details with other packages. I would like to use the publish/subscribe mechanism for security sensitive data. This sensitive topic must only be published and subscribed to by different server components. I.e. clients cannot subscribe to the sensitive topic. Since the client code can be altered by a malicious user, the server must explicitly prevent a

Security for Meteor methods while allowing server to run code too

萝らか妹 提交于 2019-12-23 05:42:34
问题 I have a method that I'd only like admins to be able to call, but I also want it to run in Meteor.onStartup(). How can I do this? I've added "isAdmin": true to user documents that are admins and added an if statement to the beginning of methods that only admin should be able to call to check that this user is indeed an admin. This works great except that I want to call this method in onStartup too, but since there is no user when the onStartup code is run, the method can't be called. How can

MeteorJS - Linking images (FS.collection) to their relevant document in the MongoDB Collection

自闭症网瘾萝莉.ら 提交于 2019-12-23 05:40:43
问题 I'm building an app with Meteorjs. I have a collection that is initialized as: Places=new Mongo.Collection('places'); in which I also want to store the images of the corresponding place. I've added the collectionFS package to my project. The following code creates a separate collection for the images: image=new FS.Collection("images", { stores: [new FS.Store.FileSystem("images")] }); However, I fail to understand how am I supposed to associate this set of images to its relevant document in

Two-way communication between Meteor and Node

China☆狼群 提交于 2019-12-23 05:37:33
问题 I am building a Node app that talks to an Xbee over serial and reads/controls several sensors/relays that are also Xbee equipped. I would like to use Meteor for the user interface and data storage with the Node app simply sending sensor updates and controlling the relays when triggered by the Meteor app. What would be the proper way to communicate between the Node and Meteor app? I know I can use a Node DDP client to insert sensor readings to the Meteor app. The part I am having problems with

Meteor: How to return data from the server using Meteor.call

一曲冷凌霜 提交于 2019-12-23 05:27:57
问题 When I do the following on the client: Meteor.call('fileUpload', fileInfo, fileData, function(err, response) { .... }); In the callback I need the response. So on the server I have Meteor.methods = { fileUpload: function (fileInfo, fileData) { fs.writeFile(path, fileData, "binary", function (err) { if (err) return 'error'; ... return { ..... }; } //return 'this works'; } Unfortunately I don't receive anything on the client. The problem is that the server runs async code ( fs.writeFile ). If I

Uncaught TypeError: Cannot read property 'prototype' of undefined Meteor-File Package

混江龙づ霸主 提交于 2019-12-23 05:27:54
问题 I have a problem when using this documentation: https://github.com/VeliovGroup/Meteor-Files/wiki/Image-Processing. This doc guides about create thumbnail images for pakage Meteor-File I installed all need package like the guiding, but when I run code, it had a problem: Uncaught TypeError: Cannot read property 'prototype' of undefined at patch (modules.js?hash=b849b729a9c5ee343b208254dca34d866ee59991:19084) at graceful-fs.js (modules.js?hash=b849b729a9c5ee343b208254dca34d866ee59991:18945) at

Meteor- Facebook social plugin cant load until browser refreshes

≡放荡痞女 提交于 2019-12-23 05:15:49
问题 i'm having an issue with Facebook social plugins. The like & comment box in my website only appears after refreshing the browser. Does anyone know why is this happening and how i can fix it? I'm using Meteor to build my website and the page, where the social plugins are placed, are only accessible after the user is logged in. Thank you very much! :) The test website is www.sgeasyaidtest.meteor.com and the social plugins are under the planner page. This is the script for FB login & social