diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-04-27 22:38:01 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-04-27 22:38:01 +0100 |
| commit | 2642cdd90f25528df0d9501200bc95417e60ec82 (patch) | |
| tree | 616d495bccaa000c550353412d648d6b56279f89 /lib/docx-reader.js | |
| parent | cb18e8aa92108f8576c5d4312e89e6ddbabd88c8 (diff) | |
Add content-types to image elements
Diffstat (limited to 'lib/docx-reader.js')
| -rw-r--r-- | lib/docx-reader.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/docx-reader.js b/lib/docx-reader.js index ff464d6..02841a5 100644 --- a/lib/docx-reader.js +++ b/lib/docx-reader.js @@ -29,7 +29,12 @@ function read(options) { readXmlFile(docxFile, "word/document.xml") ]).spread(function(relationshipsXml, documentXml) { var relationships = relationshipsXml ? readRelationships(relationshipsXml) : {}; - var reader = new DocumentXmlReader(relationships, docxFile); + var contentTypes = { + findContentType: function(path) { + return "image/png"; + } + }; + var reader = new DocumentXmlReader(relationships, contentTypes, docxFile); return reader.convertXmlToDocument(documentXml); }); }); |
