Meteor: relative/absolute path issue -


i'm testing out old code , i'm getting error , looks these lines of code:

var targetfile='../../../../../public/image1.png'; var sourcefile='../../../../../../game4-dirs/public/image2.png';  fs.writefilesync(targetfile, fs.readfilesync(sourcefile)); 

the error i'm getting is:

error: enoent, unlink '../../../../../public/image1.png' 

i seem vaguely remember public , game4-dirs aren't accessible relatively product relatively meteor installed (or that, can't quite remember).

has change in version 1.2.0.2? using v0.9.3.1

thank :)

if meteor application lives @ myapp on disk files under myapp/public available @ root in html /. means url image1.png should /image1.png.

it looks ../../../../../../game4-dirs/public/image2.png trying access file not below meteor app's root directory. meteor won't allow on client obvious security reasons. if want use image2.png should move app's /public directory , refer in html /image2.png


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -