提交
This commit is contained in:
@@ -677,7 +677,7 @@ str = str.replace(regex, function (match, content, offset, fullString) {
|
|||||||
});
|
});
|
||||||
mammoth.convertToHtml({ arrayBuffer }, {
|
mammoth.convertToHtml({ arrayBuffer }, {
|
||||||
convertImage: mammoth.images.inline(async function (image) {
|
convertImage: mammoth.images.inline(async function (image) {
|
||||||
console.log('image at line 163:', image)
|
|
||||||
const contentType = image.contentType.toLowerCase();
|
const contentType = image.contentType.toLowerCase();
|
||||||
const allowedTypes = ['image/jpeg', 'image/jpg', 'image/png'];
|
const allowedTypes = ['image/jpeg', 'image/jpg', 'image/png'];
|
||||||
if (!allowedTypes.includes(contentType)) {
|
if (!allowedTypes.includes(contentType)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user