node.js - accessing files in meteor -
i have use case create documents on fly inside meteor app. have template document stored in meteor folder , static images embed in documents in app. users take pictures using camera inside , app , upload them folder in meteor app, these embedded in document created. storing these files in .uploads folder inside app , accessing it. when in local have no problem not sure how getting copied deployed app , how access these files.
i using windows development process.env.pwd not working in local dev. using below code working in local doesn't work in server.
var base = process.cwd(); console.log("base path:", base); var afterresolvefind = base.split('.meteor')[0]; var path = meteor.npmrequire('path'); var inputpath = ".uploads//templates//input.docx" filepath = path.join(afterresolvefind, inputpath);
Comments
Post a Comment