mirror of
https://github.com/standardnotes/web.git
synced 2024-10-04 03:07:18 +03:00
chore: fix files e2e test [skip e2e]
This commit is contained in:
parent
50b058cafb
commit
ab9456e192
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user