Skip to content

Commit

Permalink
fix: parse word use latest mammoth
Browse files Browse the repository at this point in the history
Resolves: #88
  • Loading branch information
yinanazhou committed Jul 2, 2024
1 parent 1efb86b commit e52ce47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Dashboard/Storage.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PouchDB from 'pouchdb';
import { AllDocs, Doc, uploadsInfo } from '../Types';
import * as Papa from 'papaparse';
import * as mammoth from 'mammoth/mammoth.browser';

export const db = new PouchDB('Cress-User-Storage');

Expand Down Expand Up @@ -88,7 +89,6 @@ async function parseXLSX(file: File): Promise<any[]> {

export async function parseWORD(arrayBuffer: ArrayBuffer): Promise<any[]> {
return new Promise((resolve, reject) => {
let mammoth = require('mammoth');
mammoth
.convertToHtml({ arrayBuffer: arrayBuffer })
.then(function (result) {
Expand Down

0 comments on commit e52ce47

Please sign in to comment.