We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa6e7e2 commit c3a4ba5Copy full SHA for c3a4ba5
1 file changed
packages/web-api/src/file-upload.ts
@@ -191,7 +191,7 @@ export async function getFileData(options: FilesUploadV2Arguments | FileUploadV2
191
192
export function getFileDataLength(data: Buffer): number {
193
if (data) {
194
- return Buffer.byteLength(data.toString('utf8'));
+ return Buffer.byteLength(data);
195
}
196
throw errorWithCode(new Error(buildFileSizeErrorMsg()), ErrorCode.FileUploadReadFileDataError);
197
0 commit comments