gamemaker1 / office-text-extractor

Yet another library to extract text from MS Office and PDF files
https://npm.im/office-text-extractor
ISC License
59 stars 7 forks source link

Aborts upload request in express api #7

Closed gerkim62 closed 1 year ago

gerkim62 commented 1 year ago

Description

when a file is uploaded via frontend, whenever i call

const text = await extractText(filePath);

the upload request in the browser network tab get canceled

Library version

"office-text-extractor": "^2.0.0

Node version

v18.15.0

Typescript version (if you are using it)

No response

gamemaker1 commented 1 year ago

Hi @gerkim62,

Thanks for reporting this issue.

Are you using the library in your frontend or server-side? The package supports browser environments from version 3.0.0 onwards, which you can install using npm install office-text-extractor@next.

Is there any error that you can see when you call the extractText function?

gerkim62 commented 1 year ago

Hi @gamemaker1,

Thank you for your response and suggestions.

Upon further investigation, I've realized that the issue is not related to the "office-text-extractor" library. It seems to be occurring before the extractText function is even called.

I've reviewed my frontend code and found an issue with how I'm handling the file upload. It appears that the request is not being sent correctly to the server. I will double-check the code to ensure that the file is properly included in the request payload.

Additionally, I'll review the server-side code that handles the file upload process and investigate if there are any errors or issues there. I'll also verify that the file path passed to the extractText function is correct and that the file exists at that location.

I'll follow your suggestions and debug the code, as well as check any error logs that may provide more information. I'll also test with different files to see if the issue is specific to a particular file.

Considering that the issue is not directly related to the library and appears to be an implementation issue on my side, I suggest closing this issue. It seems more appropriate to address this through other means, such as community support or Stack Overflow.

Thank you for your assistance, and I appreciate any further guidance you can provide.

Best regards, gerkim62

gamemaker1 commented 1 year ago

Ohkay great!