diff --git a/src/import/card.rs b/src/import/card.rs index a624e38..c1be96a 100644 --- a/src/import/card.rs +++ b/src/import/card.rs @@ -103,20 +103,22 @@ impl Actor for ImportCardActor { .result? .attachments; for trello_attachment in attachments.into_iter() { - let trello_attachment_name = trello_attachment.name.clone(); - let child = spawn_in_thread!( - actor_ref, - ImportAttachmentActor::new( - this.ctx.clone(), - this.nextcloud_board_id, - this.nextcloud_stack_id, - nextcloud_card.id, - this.trello_card.id.clone(), - trello_attachment, - ) - ); - this.attachments_children - .insert(child.id(), (trello_attachment_name, child.clone())); + if trello_attachment.is_upload { + let trello_attachment_name = trello_attachment.name.clone(); + let child = spawn_in_thread!( + actor_ref, + ImportAttachmentActor::new( + this.ctx.clone(), + this.nextcloud_board_id, + this.nextcloud_stack_id, + nextcloud_card.id, + this.trello_card.id.clone(), + trello_attachment, + ) + ); + this.attachments_children + .insert(child.id(), (trello_attachment_name, child.clone())); + } } if this.labels_children.is_empty() && this.attachments_children.is_empty() { diff --git a/src/trello/model/attachment.rs b/src/trello/model/attachment.rs index 8c75307..16f8f79 100644 --- a/src/trello/model/attachment.rs +++ b/src/trello/model/attachment.rs @@ -26,4 +26,6 @@ pub(crate) struct TrelloAttachment { pub(crate) url: TrelloAttachmentUrl, //"https://admin.typeform.com/form/RzExEM/share#/link", #[serde(rename = "fileName")] pub(crate) file_name: TrelloAttachmentFilename, + #[serde(rename = "isUpload")] + pub(crate) is_upload: bool, }