Issue Uploading PDFs (API) for Analysis in Doc Extraction
Hi everyone,
I’m experiencing an issue when trying to upload PDF files for analysis in LandingAI API (not in the website). When I upload a JPG image (API), everything works fine, and the tool processes the file as expected. However, when I try to upload a PDF, I receive the following error:
{'message': '[{\'type\': \'value_error\', \'loc\': (\'body\',), \'msg\': \'Value error, Must provide either an image or PDF file.\', ... }]}
This suggests that the system is not recognizing the uploaded PDF properly, but I do not encounter this issue with JPG files. Here’s what I’ve tried so far:
1. Confirmed that the PDF is valid and not corrupted by opening it in a PDF viewer.
2. Ensured that the request includes the correct Content-Type and file format.
3. Used both multipart/form-data and application/json approaches for sending the request.
4. Tested with different PDFs, but the issue persists.
If anyone has encountered this issue before or has suggestions on how to resolve it, I would really appreciate your help.
Thanks in advance!