I'm a little confused by this error on the server. Exception while invoking method 'slingshotUploadFile' TypeError: Object [object Object] has no method 'getParam' The error appears to be related to var id = FlowRouter.getParam('id'); however when I console.log(id) it prints the correct id. Is FlowRouter.getParam('id'); not suppose to be used in a method?
Meteor.methods({
slingshotUploadFile: function( url ) {
check(url, String);
var id = FlowRouter.getParam('id');
try {
Files.insert({
url: url,
userId: id,
added: new Date()
});
} catch( exception ) {
retu exception;
}
}
});
