Reading files from a directory inside a meteor app

后端 未结 7 705
既然无缘
既然无缘 2021-01-04 08:28

How can i read the public directory in a meteor application inside my /server path.

I tried using the native \'fs\' package but i keep getting a file/di

7条回答
  •  失恋的感觉
    2021-01-04 08:54

    Access files without the "/public" part. In a running Meteor app, the public directory becomes your root, and everything that is located at /public/whatever can be accessed at /whatever.

    Additionally, if you're playing around with files, you might find these useful:

    • FileSaver.js
    • CollectionFS

提交回复
热议问题