This commit is contained in:
2026-04-17 09:29:40 +08:00
parent 5745a36393
commit c6489e7af0

View File

@@ -677,7 +677,7 @@ str = str.replace(regex, function (match, content, offset, fullString) {
});
mammoth.convertToHtml({ arrayBuffer }, {
convertImage: mammoth.images.inline(async function (image) {
console.log('image at line 163:', image)
const contentType = image.contentType.toLowerCase();
const allowedTypes = ['image/jpeg', 'image/jpg', 'image/png'];
if (!allowedTypes.includes(contentType)) {