Meteor-files: URGENT PLEASE: Files are deleted after App Rebuilds

Created on 7 Dec 2016  路  8Comments  路  Source: veliovgroup/Meteor-Files

Hello, Please I need help with this package. This is my first time. This is quite urgent please.
The files seem to be deleted from the upload directory assets\app\uploads\Images after the application is rebuilt. Is there a way to solve this please? Thanks.

MUX question

All 8 comments

Hi @kenshinman

Yes, From the FAQ:

On development stage: yourDevAppDir/.meteor/local/build/programs/server
Note: All files will be removed as soon as your application rebuilds or you run meteor reset. To keep your storage persistent during development use an absolute path outside of your project folder, e.g. /data directory.

@dr-dimitru Wow! Thanks for the swift response, I'll give it a try and get back to you. Thanks a lot

@dr-dimitru Thanks this works well on my localhost:3000. One issue though, I am deploying with mupx which wraps my app in a docker container. Any suggestions on how to refer to the directory outside the docker container? Thanks a lot

@kenshinman no idea, never used mup/x
I'm suggesting to use 3rd party, like AWS S3.
If mum/x deploys MongoDB from dev stage, use - GridFS

@kenshinman pm2-meteor is another choice for deploy without docker

Hi @kenshinman

Is this issue solved?

No. But
Tried pm2-meteor but it didn't work also. Only mupx seems to work but still deletes my files. But I found a temporary solution. i would save all the uploaded files (images) somewhere on the server before deploying a new build then upload to the new docker path . This seems to work for now.

The latest MUP is a kinda a solution because it allows you add volumes to your docker container on deployment which means you can have persistent files. Still working on it though. Thanks @dr-dimitru for the help

@dr-dimitru
storagePath: '../../../../../data', should be the default file storage location, even on a dev stage, or at least console warnings should be thrown telling the user to set a persistent upload path. There is nothing wrong with a persistent local folder on a dev stage.

Production builds will always point to a remote folder/dfs/aws anyways.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JanSchuermannPH picture JanSchuermannPH  路  3Comments

menelike picture menelike  路  3Comments

Avijobo picture Avijobo  路  3Comments

msgfxeg picture msgfxeg  路  3Comments

RE-N-Y picture RE-N-Y  路  3Comments