Saving a file to public/downloaded cause meteor to rebuild

Is there a way to make meteor ignore a folder so that if the contents change it won’t rebuild?

Anything in a .somename/ folder won’t be built (prefix with dot).

On the server side I am using:

const fs = require(‘fs’);
var path = process.env[‘METEOR_SHELL_DIR’] + ‘/…/…/…/public/.downloaded’;

and saving a file to it.
I have changed the directory on the system to .downloaded and half way through the saving of the file meteor rebuilds

I solved this by saving instead to .meteor.

This leaves me with an issue where the user will not be able to download the file as it is on the server.
Because as far as I am aware they do have access to the public folder but not the other ones.

You should really not store folders in the Meteor directory. Use some service like s3 or a locally installed service to store files.

If you want to deliver a file to your client you can stream it from everywhere.

1 Like

As @lucfranken says! It wasn’t clear from your original post that you were trying to upload files locally. Definitely a bad idea - take a look at packages like edgee:slingshot for a better way of doing this.

:slight_smile: