setAttachmentTo method
Future<DecryptedDocumentDto?>
setAttachmentTo(
- UserDto user,
- String documentId,
- ByteStream attachment,
- String? docEncKeys,
- CryptoConfig<
DecryptedDocumentDto, DocumentDto> config,
Implementation
Future<DecryptedDocumentDto?> setAttachmentTo(UserDto user, String documentId, ByteStream attachment, String? docEncKeys, CryptoConfig<DecryptedDocumentDto, DocumentDto> config) async {
return await (await this.rawSetDocumentAttachment(documentId, attachment, enckeys: docEncKeys))?.let((it) => config.decryptDocument(user.dataOwnerId()!, it));
}