mirror of
https://github.com/wekan/wekan.git
synced 2026-02-05 08:01:49 +01:00
Move In Progress ostrio-files changes to separate branch, and revert ostrio-files changes, so that:
- Export to CSV/TSV with custom fields works - Attachments are not exported to disk - It is possible to build arm64/s390x versions again. Thanks to xet7 ! Related #3110
This commit is contained in:
parent
23dcd084a4
commit
d52affe658
22 changed files with 385 additions and 757 deletions
|
|
@ -412,14 +412,10 @@ Cards.helpers({
|
|||
const _id = Cards.insert(this);
|
||||
|
||||
// Copy attachments
|
||||
oldCard.attachments().forEach((file) => {
|
||||
Meteor.call('cloneAttachment', file,
|
||||
{
|
||||
meta: {
|
||||
cardId: _id
|
||||
}
|
||||
}
|
||||
);
|
||||
oldCard.attachments().forEach(att => {
|
||||
att.cardId = _id;
|
||||
delete att._id;
|
||||
return Attachments.insert(att);
|
||||
});
|
||||
|
||||
// copy checklists
|
||||
|
|
@ -522,15 +518,14 @@ Cards.helpers({
|
|||
attachments() {
|
||||
if (this.isLinkedCard()) {
|
||||
return Attachments.find(
|
||||
{ 'meta.cardId': this.linkedId },
|
||||
{ cardId: this.linkedId },
|
||||
{ sort: { uploadedAt: -1 } },
|
||||
);
|
||||
} else {
|
||||
let ret = Attachments.find(
|
||||
{ 'meta.cardId': this._id },
|
||||
return Attachments.find(
|
||||
{ cardId: this._id },
|
||||
{ sort: { uploadedAt: -1 } },
|
||||
);
|
||||
return ret;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -539,7 +534,7 @@ Cards.helpers({
|
|||
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.link();
|
||||
return cover && cover.url() && cover;
|
||||
},
|
||||
|
||||
checklists() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue