Saving a file to public/downloaded cause meteor to rebuild


#1

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


#2

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


#3

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


#5

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.


#6

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.


#7

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: