mirror of
https://github.com/dolanmiu/docx.git
synced 2026-11-30 16:47:55 +01:00
Fix reading template images in the browser
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
# https://prettier.io/docs/en/options.html#end-of-line
|
||||
* text=auto eol=lf
|
||||
@@ -157,7 +157,8 @@ export class ImportDotx {
|
||||
const hyperLinkReferences = this.findReferenceFiles(xmlRef).filter((r) => r.type === RelationshipType.HYPERLINK);
|
||||
|
||||
for (const r of wrapperImagesReferences) {
|
||||
const buffer = await zipContent.files[`word/${r.target}`].async("nodebuffer");
|
||||
const bufferType = JSZip.support.arraybuffer ? "arraybuffer" : "nodebuffer";
|
||||
const buffer = await zipContent.files[`word/${r.target}`].async(bufferType);
|
||||
const mediaData = media.addMedia(buffer, {
|
||||
width: 100,
|
||||
height: 100,
|
||||
|
||||
Reference in New Issue
Block a user