mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-26 19:44:57 +02:00
Rework client storage access (#10081)
* add generic uploader interface Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com> * fix: refactor xhr upload Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com> * enhance xhr upload Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com> * refactor uploader Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com> * fix: restore files url Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com> * move storage client to core Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com> * fix: revert front cookie Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com> --------- Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
+3
-2
@@ -155,7 +155,7 @@
|
||||
|
||||
try {
|
||||
const uploadFile = await getResource(attachment.helper.UploadFile)
|
||||
const uuid = await uploadFile(file)
|
||||
const { uuid, metadata } = await uploadFile(file)
|
||||
const attachmentId: Ref<Attachment> = generateId()
|
||||
|
||||
await client.addCollection(
|
||||
@@ -169,7 +169,8 @@
|
||||
name: file.name,
|
||||
type: file.type,
|
||||
size: file.size,
|
||||
lastModified: file.lastModified
|
||||
lastModified: file.lastModified,
|
||||
metadata
|
||||
},
|
||||
attachmentId
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user