UBERF-7011: Switch to Ref<Blob> (#5661)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-05-27 12:25:57 +05:00
committed by GitHub
parent 27a98e0641
commit 8c6a5f4e9d
158 changed files with 1795 additions and 1049 deletions
@@ -15,7 +15,7 @@
<script lang="ts">
import attachment, { Attachment } from '@hcengineering/attachment'
import contact from '@hcengineering/contact'
import { Account, Doc, Ref, generateId } from '@hcengineering/core'
import { Account, Doc, Ref, generateId, type Blob } from '@hcengineering/core'
import { IntlString, getResource, setPlatformStatus, unknownError } from '@hcengineering/platform'
import { KeyedAttribute, createQuery, getClient, uploadFile } from '@hcengineering/presentation'
import { getCollaborationUser, getObjectLinkFragment } from '@hcengineering/view-resources'
@@ -132,7 +132,7 @@
progress = false
}
async function createAttachment (file: File): Promise<{ file: string, type: string } | undefined> {
async function createAttachment (file: File): Promise<{ file: Ref<Blob>, type: string } | undefined> {
try {
const uuid = await uploadFile(file)
const _id: Ref<Attachment> = generateId()