Problems with Meteor 1.8.1?
See original GitHub issueI’m having an issue:
After updating to Meteor 1.8.1 I’m having problems with my file upload. I’m using version 1.10.2 according to my versions file.
It happens in the FilesCollection constructor on the server inside the onBeforeUpload:
The this.userId and this.user() are both null even though I’m logged in as a user.
In the logs I also get this error:
W20190404-10:25:41.952(2)? (STDERR) [FilesCollection] [Upload] [HTTP] Exception: TypeError: Cannot read property 'profile' of undefined W20190404-10:25:41.953(2)? (STDERR) at Object.onBeforeUpload (imports/api/files/server/files_server.js:108:11) W20190404-10:25:41.953(2)? (STDERR) at FilesCollection._prepareUpload (packages/ostrio:files/server.js:903:51) W20190404-10:25:41.953(2)? (STDERR) at bound (packages/ostrio:files/server.js:568:34) W20190404-10:25:41.953(2)? (STDERR) at Meteor.bindEnvironment.callback (packages/ostrio:files/server.js:21:50) W20190404-10:25:41.953(2)? (STDERR) at runWithEnvironment (packages/meteor.js:1286:24) W20190404-10:25:41.956(2)? (STDERR) [object Object] W20190404-10:25:41.957(2)? (STDERR) at handleError (packages/ostrio:files/server.js:441:21) W20190404-10:25:41.957(2)? (STDERR) at bound (packages/ostrio:files/server.js:602:15) W20190404-10:25:41.957(2)? (STDERR) at Meteor.bindEnvironment.callback (packages/ostrio:files/server.js:21:50) W20190404-10:25:41.957(2)? (STDERR) at runWithEnvironment (packages/meteor.js:1286:24)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:10 (2 by maintainers)

Top Related StackOverflow Question
Wow, that was fast 😮 just merged it right now. @dr-dimitru are you free in time to publish a new version on atmosphere?
fix is available at https://github.com/VeliovGroup/Meteor-Files/pull/683