I'm working on a site with a MEAN stack scaffolded from this yeoman.io generator: https://github.com/DaftMonk/generator-angular-fullstack, and I'm trying to upload some image files to MongoDB in binary form. Here is my git repo for the project:
https://github.com/peter-atlanta/personal-site
I've followed @aheckmann's GIST to a tee: https://gist.github.com/aheckmann/2408370,
But I keep getting errors about how my files can't be found, i.e.
Error: ENOENT, no such file or directory '../../client/assets/images/github.png'
at Error (native)
at Object.fs.openSync (fs.js:500:18)
at Object.fs.readFileSync (fs.js:352:15)
at Immediate.<anonymous> (/Users/peterward/petergrayward/blog/server/config/imageToMongo.js:43:21)
at Immediate._onImmediate (/Users/peterward/petergrayward/blog/node_modules/mongoose/node_modules/mquery/lib/utils.js:137:16)
at processImmediate [as _immediateCallback] (timers.js:358:17)
Clearly, though, the png in question is located in that directory, and I've even tried moving the directory server-side to no avail.
Why can't a file/directory entry-point be found?