chore: fix files e2e test [skip e2e]

This commit is contained in:
Aman Harwara 2024-05-22 15:47:21 +05:30
parent 50b058cafb
commit ab9456e192
No known key found for this signature in database
GPG Key ID: FCE19AA227F56E46

View File

@ -1,3 +1,5 @@
import * as Utils from './Utils.js'
export async function uploadFile(fileService, buffer, name, ext, chunkSize, vault, options = {}) {
const byteLength = options.byteLengthOverwrite || buffer.byteLength
const operation = await fileService.beginNewFileUpload(byteLength, vault)
@ -17,7 +19,9 @@ export async function uploadFile(fileService, buffer, name, ext, chunkSize, vaul
}
}
const file = await fileService.finishUpload(operation, name, ext)
const uuid = Utils.generateUuid()
const file = await fileService.finishUpload(operation, { name, mimeType: ext }, uuid)
return file
}