Skip to content

Commit

Permalink
chore: fix files e2e test [skip e2e]
Browse files Browse the repository at this point in the history
  • Loading branch information
amanharwara committed May 22, 2024
1 parent 50b058c commit ab9456e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/snjs/mocha/lib/Files.js
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
}
Expand Down

0 comments on commit ab9456e

Please sign in to comment.