Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in File ingestion in external api using HTTP Request node #9695

Closed
5 tasks done
muckthaa-ss opened this issue Oct 23, 2024 · 3 comments
Closed
5 tasks done

Error in File ingestion in external api using HTTP Request node #9695

muckthaa-ss opened this issue Oct 23, 2024 · 3 comments
Labels
🐞 bug Something isn't working

Comments

@muckthaa-ss
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.10.0

Cloud or Self Hosted

Cloud

Steps to reproduce

I upload a file in the HTTP request body, but it returns an error saying unsupported file format.
Example, I upload a .pdf file and the external api for ingestion handles .pdf and .txt files and for other formats, it throws the "unsupported file format." message.
Screenshot 2024-10-23 115238

✔️ Expected Behavior

File is ingested successfully message in the output.

❌ Actual Behavior

Unsupported file format error.

Copy link

dosubot bot commented Oct 23, 2024

The "unsupported file format" error you're encountering might be due to a few potential issues:

  1. File Format Validation: Ensure that the file is indeed a valid PDF. Sometimes, files with a .pdf extension might not be properly formatted as PDFs, leading to validation errors.

  2. Content-Type Header: Verify that the Content-Type header is correctly set to multipart/form-data in your HTTP request. This is crucial for file uploads, as it ensures the server correctly interprets the incoming data [1].

  3. File Size Limitations: Check if the file size exceeds any limits set by the API. The Dify API supports files up to 15MB in size [2].

  4. Correct API Endpoint: Double-check that you are using the correct API endpoint and that it is configured to accept PDF files.

If all these aspects are correctly configured and the issue persists, there might be a need to look into the server-side handling of the file to ensure it is not rejecting the file for any other reason.

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the 🐞 bug Something isn't working label Oct 23, 2024
@muckthaa-ss
Copy link
Author

It is a valid .pdf file and the file is just 422kb.
I have also verified the API endpoint and the header and it is correct.

@crazywoola
Copy link
Member

Duplicated #9599

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants