You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since upgrading from 1.5.1 to 1.6.0 I had to change the interactions with the library from Buffer to ArrayBuffer.
It's working fine with the below code, but Typescript flags an issue because it's expecting buffer to be type Buffer
Passing in arrayBuffer as the parameter name doesn't work as it throws an error about being unable to find a file in the unzip step.
export async function generateHtmlFromDocx(arrayBuffer: ArrayBuffer) { const { value: html } = await mammoth.convertToHtml({ buffer: arrayBuffer, }); return html; }
The text was updated successfully, but these errors were encountered:
Are you on node.js or in the browser? Assuming you're on node.js, since you mention using Buffer, why did you have to change from using Buffer to ArrayBuffer?
Since upgrading from 1.5.1 to 1.6.0 I had to change the interactions with the library from Buffer to ArrayBuffer.
It's working fine with the below code, but Typescript flags an issue because it's expecting buffer to be type Buffer
Passing in arrayBuffer as the parameter name doesn't work as it throws an error about being unable to find a file in the unzip step.
export async function generateHtmlFromDocx(arrayBuffer: ArrayBuffer) { const { value: html } = await mammoth.convertToHtml({ buffer: arrayBuffer, }); return html; }
The text was updated successfully, but these errors were encountered: