Import attachments

This commit is contained in:
Xavier Priour 2015-11-16 21:41:49 +01:00
parent 475bc70621
commit ad27a59e57
3 changed files with 121 additions and 63 deletions

View file

@ -108,7 +108,10 @@ Cards.helpers({
},
cover() {
return Attachments.findOne(this.coverId);
const cover = Attachments.findOne(this.coverId);
// if we return a cover before it is fully stored, we will get errors when we try to display it
// todo XXX we could return a default "upload pending" image in the meantime?
return cover && cover.url() && cover;
},
absoluteUrl() {