Tool HTTP request, returned application/octet-stream, file type not recognized #9876

Closed
opened 2026-02-21 18:40:01 -05:00 by yindo · 0 comments
Owner

Originally created by @fq393 on GitHub (Mar 7, 2025).

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

1.0.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

curl --location --request POST 'http://10.27.24.233:8081/api/v1/convert/pdf/word'
--form 'fileInput=@"/Users/soya/Desktop/1219926043.pdf"'
--form 'outputFormat="docx"'
The above is the request curl,postman the returned information is as follows:
Content-Type | application/octet-stream
Content-Disposition | form-data; name="attachment"; filename="1219926043.docx"
Content-Length | 116257

The workflow is as follows:

Image

The debug trace information is as follows:
{
"status_code": 200,
"body": "",
"headers": {
"date": "Sat, 08 Mar 2025 04:42:33 GMT",
"content-type": "application/octet-stream",
"content-disposition": "form-data; name="attachment"; filename="1219926043.docx"",
"content-length": "116257",
"cache-status": "ac5c6a2e8fde;detail=mismatch",
"via": "1.1 ac5c6a2e8fde (squid/6.10)",
"connection": "keep-alive"
},
"files": [
{
"dify_model_identity": "dify__file",
"id": null,
"tenant_id": "5185fd0a-047c-4abf-b27f-f91ed93f6c0f",
"type": "custom",
"transfer_method": "tool_file",
"remote_url": null,
"related_id": "71aef328-2b8a-4808-b49d-5dd1079f900f",
"filename": "2ff8edd9bb0d4557a2c68d2a02e98271.bin",
"extension": ".bin",
"mime_type": "application/octet-stream",
"size": 116257,
"url": "http://10.27.24.230//files/tools/71aef328-2b8a-4808-b49d-5dd1079f900f.bin?timestamp=1741408957&nonce=d0a6a819f20afe7291b99d35a98c1082&sign=T9Qu-AmUwlsvOJmomm6CrrxJaZCmQEkAl1Vc2Fwp6ng="
}
]
}

✔️ Expected Behavior

{
"status_code": 200,
"body": "",
"headers": {
"date": "Sat, 08 Mar 2025 04:42:33 GMT",
"content-type": "application/octet-stream",
"content-disposition": "form-data; name="attachment"; filename="1219926043.docx"",
"content-length": "116257",
"cache-status": "ac5c6a2e8fde;detail=mismatch",
"via": "1.1 ac5c6a2e8fde (squid/6.10)",
"connection": "keep-alive"
},
"files": [
{
"dify_model_identity": "dify__file",
"id": null,
"tenant_id": "5185fd0a-047c-4abf-b27f-f91ed93f6c0f",
"type": "custom",
"transfer_method": "tool_file",
"remote_url": null,
"related_id": "71aef328-2b8a-4808-b49d-5dd1079f900f",
"filename": "2ff8edd9bb0d4557a2c68d2a02e98271.docx",
"extension": ".docx",
"mime_type": "application/octet-stream",
"size": 116257,
"url": "http://10.27.24.230//files/tools/71aef328-2b8a-4808-b49d-5dd1079f900f.bin?timestamp=1741408957&nonce=d0a6a819f20afe7291b99d35a98c1082&sign=T9Qu-AmUwlsvOJmomm6CrrxJaZCmQEkAl1Vc2Fwp6ng="
}
]
}

Actual Behavior

{
"status_code": 200,
"body": "",
"headers": {
"date": "Sat, 08 Mar 2025 04:42:33 GMT",
"content-type": "application/octet-stream",
"content-disposition": "form-data; name="attachment"; filename="1219926043.docx"",
"content-length": "116257",
"cache-status": "ac5c6a2e8fde;detail=mismatch",
"via": "1.1 ac5c6a2e8fde (squid/6.10)",
"connection": "keep-alive"
},
"files": [
{
"dify_model_identity": "dify__file",
"id": null,
"tenant_id": "5185fd0a-047c-4abf-b27f-f91ed93f6c0f",
"type": "custom",
"transfer_method": "tool_file",
"remote_url": null,
"related_id": "71aef328-2b8a-4808-b49d-5dd1079f900f",
"filename": "2ff8edd9bb0d4557a2c68d2a02e98271.bin",
"extension": ".bin",
"mime_type": "application/octet-stream",
"size": 116257,
"url": "http://10.27.24.230//files/tools/71aef328-2b8a-4808-b49d-5dd1079f900f.bin?timestamp=1741408957&nonce=d0a6a819f20afe7291b99d35a98c1082&sign=T9Qu-AmUwlsvOJmomm6CrrxJaZCmQEkAl1Vc2Fwp6ng="
}
]
}

Originally created by @fq393 on GitHub (Mar 7, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.0.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce curl --location --request POST 'http://10.27.24.233:8081/api/v1/convert/pdf/word' \ --form 'fileInput=@"/Users/soya/Desktop/1219926043.pdf"' \ --form 'outputFormat="docx"' The above is the request curl,postman the returned information is as follows: Content-Type | application/octet-stream Content-Disposition | form-data; name="attachment"; filename="1219926043.docx" Content-Length | 116257 The workflow is as follows: <img width="744" alt="Image" src="https://github.com/user-attachments/assets/924055b5-7ac2-48f6-984d-4ba852b8f582" /> The debug trace information is as follows: { "status_code": 200, "body": "", "headers": { "date": "Sat, 08 Mar 2025 04:42:33 GMT", "content-type": "application/octet-stream", "content-disposition": "form-data; name=\"attachment\"; filename=\"1219926043.docx\"", "content-length": "116257", "cache-status": "ac5c6a2e8fde;detail=mismatch", "via": "1.1 ac5c6a2e8fde (squid/6.10)", "connection": "keep-alive" }, "files": [ { "dify_model_identity": "__dify__file__", "id": null, "tenant_id": "5185fd0a-047c-4abf-b27f-f91ed93f6c0f", "type": "custom", "transfer_method": "tool_file", "remote_url": null, "related_id": "71aef328-2b8a-4808-b49d-5dd1079f900f", "filename": "2ff8edd9bb0d4557a2c68d2a02e98271.bin", "extension": ".bin", "mime_type": "application/octet-stream", "size": 116257, "url": "http://10.27.24.230//files/tools/71aef328-2b8a-4808-b49d-5dd1079f900f.bin?timestamp=1741408957&nonce=d0a6a819f20afe7291b99d35a98c1082&sign=T9Qu-AmUwlsvOJmomm6CrrxJaZCmQEkAl1Vc2Fwp6ng=" } ] } ### ✔️ Expected Behavior { "status_code": 200, "body": "", "headers": { "date": "Sat, 08 Mar 2025 04:42:33 GMT", "content-type": "application/octet-stream", "content-disposition": "form-data; name=\"attachment\"; filename=\"1219926043.docx\"", "content-length": "116257", "cache-status": "ac5c6a2e8fde;detail=mismatch", "via": "1.1 ac5c6a2e8fde (squid/6.10)", "connection": "keep-alive" }, "files": [ { "dify_model_identity": "__dify__file__", "id": null, "tenant_id": "5185fd0a-047c-4abf-b27f-f91ed93f6c0f", "type": "custom", "transfer_method": "tool_file", "remote_url": null, "related_id": "71aef328-2b8a-4808-b49d-5dd1079f900f", "filename": "2ff8edd9bb0d4557a2c68d2a02e98271.docx", "extension": ".docx", "mime_type": "application/octet-stream", "size": 116257, "url": "http://10.27.24.230//files/tools/71aef328-2b8a-4808-b49d-5dd1079f900f.bin?timestamp=1741408957&nonce=d0a6a819f20afe7291b99d35a98c1082&sign=T9Qu-AmUwlsvOJmomm6CrrxJaZCmQEkAl1Vc2Fwp6ng=" } ] } ### ❌ Actual Behavior { "status_code": 200, "body": "", "headers": { "date": "Sat, 08 Mar 2025 04:42:33 GMT", "content-type": "application/octet-stream", "content-disposition": "form-data; name=\"attachment\"; filename=\"1219926043.docx\"", "content-length": "116257", "cache-status": "ac5c6a2e8fde;detail=mismatch", "via": "1.1 ac5c6a2e8fde (squid/6.10)", "connection": "keep-alive" }, "files": [ { "dify_model_identity": "__dify__file__", "id": null, "tenant_id": "5185fd0a-047c-4abf-b27f-f91ed93f6c0f", "type": "custom", "transfer_method": "tool_file", "remote_url": null, "related_id": "71aef328-2b8a-4808-b49d-5dd1079f900f", "filename": "2ff8edd9bb0d4557a2c68d2a02e98271.bin", "extension": ".bin", "mime_type": "application/octet-stream", "size": 116257, "url": "http://10.27.24.230//files/tools/71aef328-2b8a-4808-b49d-5dd1079f900f.bin?timestamp=1741408957&nonce=d0a6a819f20afe7291b99d35a98c1082&sign=T9Qu-AmUwlsvOJmomm6CrrxJaZCmQEkAl1Vc2Fwp6ng=" } ] }
yindo closed this issue 2026-02-21 18:40:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#9876