-
-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MUPX: files lost on re-deploy and restart #72
Comments
Make sure you aren't overwriting folder where files is stored on deploy. And currently I won't recommend to use relative path to user. I'm emphatically recommend to always use absolute path. Or at least left default value for |
then i would have to rsync to my local machine everytime I push code to the server, and when I forget once, the data would be overwritten? |
Can't clearly answer as I don't now your server's structure and how it's configured, and I've never worked with MUP/MUPX
|
i have tried I am running an |
|
|
Deploy you application, and then upload files |
|
Do you have any error/warning at server's console? |
i can upload. see the portfolio page |
I guess your server just wiping out |
but the files are still online. |
Sorry, but I did't get you.
|
when i do |
probably mupx builds app inside |
with and another thing happened a couple of times now - when uploading an image, |
|
'change #file-input': function (e, t) {
var project = this._id;
var advance = true;
var r = 0;
var files = e.currentTarget.files;
function insert(file, rank) {
log('insert');
t.currentFile.set(Images.insert({
file: file,
meta: {rank: rank, project: project, big: false},
onUploaded: function (error, fileObj) {
log('onUploaded');
if (error) {
console.log(error);
return false;
} else {
Projects.update({_id: project}, {$push: {imgs: fileObj._id}}, function (err, s) {
if (err) {
console.log('Projects.update Error: ' + err);
// return false;
} else {
console.log('Projects updated: ' + s);
t.currentFile.set(false);
advance = true;
}
});
}
}
}));
}
function loop() {
if (advance == false) {
setTimeout(function () {
loop()
}, 500);
} else {
advance = false;
insert(files[r], r);
r++;
if (r < files.length) {
loop()
}
}
}
loop();
} i had to set it up this way to allow for multiple imgs to be uploaded with one action. when I had just passed the images in without this what logs do you need? |
Logs from your server's console |
the screenshot that i shared, those where all. |
To insert multiple images use 'change #file-input': function (e, t) {
_.each(e.currentTarget.files, function (file) {
Images.insert({/* ... */});
});
} |
BTW which version of Meteor and Package are you using? |
when I use |
|
Images = new Meteor.Files({
collectionName: 'Images',
storagePath: '/data/UploadedFiles',
debug: true
}); uploading the code right now. logs follow |
ok, so i looked at the logs and saw that this issue always occurred after i had deleted a file from the about the "images go missing after using |
Deploy scheme:On your local machine (assuming you app called:
|
ok so i just spent the last three days to get your package to work in my configuration and i cant get it done. i teach this stuff to myself and this is too much. i will need to find a different package to host images. sry |
this thread clearly explains why your FS is changing on every deploy |
This is clearly a mup/mupx deploy issue since there is no volume mounted that persists your data in the docker container, so this has nothing to do with this package. I am copying a backup of all the files uploaded by ostrio:files to the newly deployed instance after deployment and that solves the issue for now. |
@FinnFrotscher could we close this issue? |
yes. i am now using S3. |
@FinnFrotscher with this package of CFS? |
@dr-dimitru no, directly via their API |
i have set the storagePath relative to user like suggested here
Images = new Meteor.Files({ collectionName: 'Images', storagePath: '~/tmp/meteor/imgs' });
but when i restart meteor in development or redeploy to the project with mupx, all imgs are gone.
The text was updated successfully, but these errors were encountered: