{"action":"created","issue":{"url":"https://api.github.com/repos/CollectionFS/Meteor-CollectionFS/issues/665","repository_url":"https://api.github.com/repos/CollectionFS/Meteor-CollectionFS","labels_url":"https://api.github.com/repos/CollectionFS/Meteor-CollectionFS/issues/665/labels{/name}","comments_url":"https://api.github.com/repos/CollectionFS/Meteor-CollectionFS/issues/665/comments","events_url":"https://api.github.com/repos/CollectionFS/Meteor-CollectionFS/issues/665/events","html_url":"https://github.com/CollectionFS/Meteor-CollectionFS/issues/665","id":70665979,"number":665,"title":"userId set to false in allow methods","user":{"login":"YuukanOO","id":939842,"avatar_url":"https://avatars.githubusercontent.com/u/939842?v=3","gravatar_id":"","url":"https://api.github.com/users/YuukanOO","html_url":"https://github.com/YuukanOO","followers_url":"https://api.github.com/users/YuukanOO/followers","following_url":"https://api.github.com/users/YuukanOO/following{/other_user}","gists_url":"https://api.github.com/users/YuukanOO/gists{/gist_id}","starred_url":"https://api.github.com/users/YuukanOO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YuukanOO/subscriptions","organizations_url":"https://api.github.com/users/YuukanOO/orgs","repos_url":"https://api.github.com/users/YuukanOO/repos","events_url":"https://api.github.com/users/YuukanOO/events{/privacy}","received_events_url":"https://api.github.com/users/YuukanOO/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-24T11:29:26Z","updated_at":"2016-02-15T09:11:58Z","closed_at":"2015-04-28T10:53:54Z","body":"When porting an application to the newer version of meteor and cfs, the userId in the allow insert/update is initialy correct and in subsequent calls (made by the chunk upload I guess) is set to false.\r\n\r\n**Model definition**\r\n```javascript\r\nDocumentsData = new FS.Collection('documents_data', {\r\n  stores: [new FS.Store.FileSystem('documents_data', { path: '~/apteor_files' })]\r\n});\r\n\r\nDocumentsData.allow({\r\n  insert: function(uid, doc) {\r\n    console.log('insert', uid);\r\n    return canUpload(uid, doc.cat_id);\r\n  },\r\n  update: function(uid, doc) {\r\n    console.log('update', uid);\r\n    return canUpload(uid, doc.cat_id);\r\n  }\r\n});\r\n```\r\n\r\n**Client side**\r\n```javascript\r\nvar files = tpl.find('[type=file]').files;\r\n_.each(files, function(file_input) {\r\n    var file = new FS.File(file_input);\r\n\r\n    // Assign the category id\r\n    file.cat_id = category_id;\r\n\r\n    // Insert the file\r\n    DocumentsData.insert(file, function(err, f) {\r\n      // (...) Internal stuff\r\n    });\r\n});\r\n```\r\n\r\nIn the server console, when uploading a single file, I got\r\n```console\r\nI20150424-13:19:02.769(2)? insert K9RdxmLhY7fyZC8zP\r\nI20150424-13:19:02.794(2)? update K9RdxmLhY7fyZC8zP\r\nI20150424-13:19:03.167(2)? insert false\r\n```"},"comment":{"url":"https://api.github.com/repos/CollectionFS/Meteor-CollectionFS/issues/comments/184124384","html_url":"https://github.com/CollectionFS/Meteor-CollectionFS/issues/665#issuecomment-184124384","issue_url":"https://api.github.com/repos/CollectionFS/Meteor-CollectionFS/issues/665","id":184124384,"user":{"login":"pl7y","id":10465876,"avatar_url":"https://avatars.githubusercontent.com/u/10465876?v=3","gravatar_id":"","url":"https://api.github.com/users/pl7y","html_url":"https://github.com/pl7y","followers_url":"https://api.github.com/users/pl7y/followers","following_url":"https://api.github.com/users/pl7y/following{/other_user}","gists_url":"https://api.github.com/users/pl7y/gists{/gist_id}","starred_url":"https://api.github.com/users/pl7y/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pl7y/subscriptions","organizations_url":"https://api.github.com/users/pl7y/orgs","repos_url":"https://api.github.com/users/pl7y/repos","events_url":"https://api.github.com/users/pl7y/events{/privacy}","received_events_url":"https://api.github.com/users/pl7y/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T09:11:58Z","updated_at":"2016-02-15T09:11:58Z","body":"Hi, what I really don't get (being new to Meteor) is what I should do when I'm NOT creating a package. In my case, I have just a simple app which uses gridFS for storing files. So, in this case, I don't have my own package.js. Is there somewhere else I should place the`imply` into?\r\n\r\nAnyway, really thanks for getting back to me, very appreciated!"}}