Support any format from rekoni service (#922)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2022-02-02 23:46:37 +07:00 committed by GitHub
parent ab911cb3f0
commit 9fefef5d4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -21,6 +21,8 @@ export interface ReconiDocument {
lastName: string
title?: string
avatar?: string
avatarName?: string
avatarFormat?: string
email?: string
phone?: string
city?: string

View File

@ -163,7 +163,7 @@
while (n--) {
u8arr[n] = data.charCodeAt(n)
}
avatar = new File([u8arr], 'avatar.png', { type: 'image/png' })
avatar = new File([u8arr], doc.avatarName ?? 'avatar.png', { type: doc.avatarFormat ?? 'image/png' })
}
const newChannels = [...channels]