mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-06 21:35:52 +08:00
fix(FileStorage): remove redundant WordExtractor import (#7625)
This commit is contained in:
parent
49653435c2
commit
cf87a840f7
@ -19,6 +19,7 @@ import { getDocument } from 'officeparser/pdfjs-dist-build/pdf.js'
|
|||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import { chdir } from 'process'
|
import { chdir } from 'process'
|
||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
|
import WordExtractor from 'word-extractor'
|
||||||
|
|
||||||
class FileStorage {
|
class FileStorage {
|
||||||
private storageDir = getFilesDir()
|
private storageDir = getFilesDir()
|
||||||
@ -228,7 +229,6 @@ class FileStorage {
|
|||||||
chdir(this.tempDir)
|
chdir(this.tempDir)
|
||||||
|
|
||||||
if (fileExtension === '.doc') {
|
if (fileExtension === '.doc') {
|
||||||
const WordExtractor = require('word-extractor')
|
|
||||||
const extractor = new WordExtractor()
|
const extractor = new WordExtractor()
|
||||||
const extracted = await extractor.extract(filePath)
|
const extracted = await extractor.extract(filePath)
|
||||||
chdir(originalCwd)
|
chdir(originalCwd)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user