Closed Jalen-Zhong closed 4 weeks ago
@Jalen-Zhong Hello! I'm here to help you with your bug report. I can assist you in solving bugs, answering questions, and becoming a contributor.
The issue you're encountering, where the filename defaults to "upload" instead of the expected filename, is likely due to how Dify handles file uploads in the HTTP node. Dify attempts to extract the filename from the URL using path.basename(url)
. If the URL does not contain a valid filename, or if the extraction process fails, the filename might default to "upload" [1].
To resolve this, ensure that the URL or the HTTP request setup in Dify includes a valid filename. Additionally, check if the content-disposition
header is correctly set in your request, as it can influence the filename determination. If the header is missing or incorrectly formatted, it might lead to the default "upload" filename being used.
To continue talking to Dosu, mention @dosu.
This should be fixed in v0.11.0
Self Checks
Dify version
0.10.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I use HTTP node to upload a file by posting my api. I find the "file object" is unexpected by print "file". The file is upload by local file.
HTTP node define:
My server define(using "FastAPI"):
print result:
✔️ Expected Behavior
”filename“ fields should be real file name. But the result display "upload".
❌ Actual Behavior
No response