mirror of
https://github.com/wekan/wekan.git
synced 2025-12-26 20:28:48 +01:00
Attachment upload from card done, need to fix download link
This commit is contained in:
parent
05c53ca01d
commit
4dcdec0084
9 changed files with 49 additions and 27 deletions
|
|
@ -80,7 +80,7 @@ Migrations.add('lowercase-board-permission', () => {
|
|||
Migrations.add('change-attachments-type-for-non-images', () => {
|
||||
const newTypeForNonImage = 'application/octet-stream';
|
||||
Attachments.find().forEach(file => {
|
||||
if (!file.isImage()) {
|
||||
if (!file.isImage) {
|
||||
Attachments.update(
|
||||
file._id,
|
||||
{
|
||||
|
|
@ -97,7 +97,7 @@ Migrations.add('change-attachments-type-for-non-images', () => {
|
|||
|
||||
Migrations.add('card-covers', () => {
|
||||
Cards.find().forEach(card => {
|
||||
const cover = Attachments.findOne({ cardId: card._id, cover: true });
|
||||
const cover = Attachments.findOne({ 'meta.cardId': card._id, cover: true });
|
||||
if (cover) {
|
||||
Cards.update(card._id, { $set: { coverId: cover._id } }, noValidate);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue