Merge pull request #1384 from simonbrunel/fix/template-images-browser
Fix reading template images in the browser
This commit is contained in:
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -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);
|
const hyperLinkReferences = this.findReferenceFiles(xmlRef).filter((r) => r.type === RelationshipType.HYPERLINK);
|
||||||
|
|
||||||
for (const r of wrapperImagesReferences) {
|
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, {
|
const mediaData = media.addMedia(buffer, {
|
||||||
width: 100,
|
width: 100,
|
||||||
height: 100,
|
height: 100,
|
||||||
|
Reference in New Issue
Block a user