Using Meteor-Files' protected hook does not provide access to @userId unless you're on localhost.
I've pinpointed the issue to the _getUser method here where the x_mtok cookie is never received by the server. The cookie is present in the browser and has the correct value, equal to Meteor.connection._lastSessionId.
Again, an emphasis on the fact that localhost actually works.
Also, @userId is present in the onBeforeUpload or onBeforeRemove hooks.
Using Meteor-Files'
protectedhook does not provide access to@userIdunless you're onlocalhost.I've pinpointed the issue to the
_getUsermethod here where thex_mtokcookie is never received by the server. The cookie is present in the browser and has the correct value, equal toMeteor.connection._lastSessionId.Again, an emphasis on the fact that localhost actually works.
Also,
@userIdis present in theonBeforeUploadoronBeforeRemovehooks.