From be080f4f17b782fdb22c77560bd235e81346fb21 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 15 Nov 2018 08:55:29 -0500 Subject: [PATCH] only use shareAttachmentWithServer for old attachments --- src/services/cipher.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/services/cipher.service.ts b/src/services/cipher.service.ts index 4926a6328a..20538d3ab0 100644 --- a/src/services/cipher.service.ts +++ b/src/services/cipher.service.ts @@ -467,7 +467,9 @@ export class CipherService implements CipherServiceAbstraction { const attachmentPromises: Array> = []; if (cipher.attachments != null) { cipher.attachments.forEach((attachment) => { - attachmentPromises.push(this.shareAttachmentWithServer(attachment, cipher.id, organizationId)); + if (attachment.key == null) { + attachmentPromises.push(this.shareAttachmentWithServer(attachment, cipher.id, organizationId)); + } }); } await Promise.all(attachmentPromises);