Meteor-files: Can't find Google cloud keyFilename location

Created on 2 Oct 2016  路  6Comments  路  Source: veliovgroup/Meteor-Files

I'm having an issue with using the Google cloud upload on production.
In the demo code, for keyFileName we add a path to our Google cloud key.json. That works fine on my local dev machine, but I can't figure it out once the app is compiled and deployed on production with mup.

If on my dev machine, my key is at /server/key.json

How does that translate to a file location on a deployed production machine?

question

Most helpful comment

Thanks @dr-dimitru , that works great.

All 6 comments

Hello @Spanomaly ,

Use /private directory, it is stale.
From the docs:

All files inside a top-level directory called private/ are only accessible from server code and can be loaded via the Assets API. This can be used for private data files and any files that are in your project directory that you don鈥檛 want to be accessible from the outside.

Thanks @dr-dimitru , that works great.

{ Error: ENOENT: no such file or directory, open meteor/local/private/googleStorageJson.json'
W20180829-19:10:30.627(5.5)? (STDERR) errno: -2,
W20180829-19:10:30.627(5.5)? (STDERR) code: 'ENOENT',
W20180829-19:10:30.627(5.5)? (STDERR) syscall: 'open',
W20180829-19:10:30.628(5.5)? (STDERR) path: '/.meteor/local/private/googleStorageJson.json' }

path for keyFilename: '../../../private/googleStorageJson.json'
keyFilename: '/googleStorageJson.json'
also dont work

Is there something I am missing?

@nikhilgoswami obviously the path is wrong. Try meteor-root package to define absolute path.

This worked for me thanks

@nikhilgoswami glad it helped

Please, support this project by:

Was this page helpful?
0 / 5 - 0 ratings