[GH-ISSUE #7611] Endpoint: POST /api/v1/files/ missing file-id in response #101807

Closed
opened 2026-05-17 23:13:31 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @Steff81 on GitHub (Dec 4, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/7611

Bug Report

Installation Method

OpenWebui Running in Docker

Environment

  • Open WebUI Version: v0.4.7(neueste)

  • Ollama (if applicable): neuste

  • Operating System: macOS latest

  • Browser (if applicable): Brave latest

Confirmation:

  • [ x] I have read and followed all the instructions provided in the README.md.
  • [ x] I am on the latest version of both Open WebUI and Ollama.
  • [ x] I have included the browser console logs.
  • [ -] I have included the Docker container logs.
  • [ x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

  • I am using the endpoint POST /api/v1/files/
  • The file is uploaded
  • The endpoint is returning http:200 and a summary of the content of the file.
  • file-id should be included in the response
  • call the next api endpoint to add the file to a knowledgebase is impossible without file-id
  • I could live by looking up the knowledgebase-id and hardcode it, but without the file-id this is useless if you want to build an external agent app for users without access to Open WebUI .

Actual Behavior:

  • I am using the endpoint POST /api/v1/files/
  • The file is uploaded
  • The endpoint is returning http:200 and a summary of the content of the file.

Description

It is impossible to continue without a file-id. In an external application with an agent where customers
have no access to Open WebUI they cannot get this file-id. So the API endpoints are useless without being able
to retrieve the file-ids or the knowledgebase ids. Especially the POST /api/v1/files/ should return the file-id, additionally to the summary of the uploaded file.

Bug Summary:
Uploaded file-id should be included in the response of the POST /api/v1/files/ endpoint

Reproduction Details

Steps to Reproduce:

  • Upload file via POST /api/v1/files/
  • check response
  • summary is present, file-id is missing

Logs and Screenshots

Browser Console Logs:
{"success":true,"message":"File uploaded successfully: I've parsed the context information and extracted relevant details from the user query. It appears that the user is seeking information on various companies or services related to construction, building maintenance, and real estate......\n\nPlease let me know how you would like me to proceed with generating a response!"}

Docker Container Logs:
not needed

Screenshots/Screen Recordings (if applicable):
not needed

Additional Information

If you want an agent application for users that do not have access to open-webui and look up the file-id or knowledge-id manually, it is impossible to build a working agent app.

Originally created by @Steff81 on GitHub (Dec 4, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/7611 # Bug Report ## Installation Method OpenWebui Running in Docker ## Environment - **Open WebUI Version:** v0.4.7(neueste) - **Ollama (if applicable):** neuste - **Operating System:** macOS latest - **Browser (if applicable):** Brave latest **Confirmation:** - [ x] I have read and followed all the instructions provided in the README.md. - [ x] I am on the latest version of both Open WebUI and Ollama. - [ x] I have included the browser console logs. - [ -] I have included the Docker container logs. - [ x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: - I am using the endpoint POST /api/v1/files/ - The file is uploaded - The endpoint is returning http:200 and a summary of the content of the file. - file-id should be included in the response - call the next api endpoint to add the file to a knowledgebase is impossible without file-id - I could live by looking up the knowledgebase-id and hardcode it, but without the file-id this is useless if you want to build an external agent app for users without access to Open WebUI . ## Actual Behavior: - I am using the endpoint POST /api/v1/files/ - The file is uploaded - The endpoint is returning http:200 and a summary of the content of the file. ## Description It is impossible to continue without a file-id. In an external application with an agent where customers have no access to Open WebUI they cannot get this file-id. So the API endpoints are useless without being able to retrieve the file-ids or the knowledgebase ids. Especially the POST /api/v1/files/ should return the file-id, additionally to the summary of the uploaded file. **Bug Summary:** Uploaded file-id should be included in the response of the POST /api/v1/files/ endpoint ## Reproduction Details **Steps to Reproduce:** - Upload file via POST /api/v1/files/ - check response - summary is present, file-id is missing ## Logs and Screenshots **Browser Console Logs:** {"success":true,"message":"File uploaded successfully: I've parsed the context information and extracted relevant details from the user query. It appears that the user is seeking information on various companies or services related to construction, building maintenance, and real estate......\n\nPlease let me know how you would like me to proceed with generating a response!"} **Docker Container Logs:** not needed **Screenshots/Screen Recordings (if applicable):** not needed ## Additional Information If you want an agent application for users that do not have access to open-webui and look up the file-id or knowledge-id manually, it is impossible to build a working agent app.
Author
Owner

@tjbck commented on GitHub (Dec 4, 2024):

id is returned.

<!-- gh-comment-id:2518672206 --> @tjbck commented on GitHub (Dec 4, 2024): `id` is returned.
Author
Owner

@Steff81 commented on GitHub (Dec 4, 2024):

Sorry, but i cannot see a file-id here.

This is var_dump of the complete Response Object from the POST /api/v1/files/
$this->rsp->Raw = curl_exec($this->curl);
var_dump($this->rsp);

object(EmbedDocument)#2 (4) {
["Raw"]=>
string(780) "{"model":"llama3:latest","created_at":"2024-12-04T22:49:03.13258Z","message":{"role":"assistant","content":"I've parsed the context information, which appears to be a collection of company profiles and services offered by various businesses in the construction and contracting industry. The companies listed seem to provide a range of services including building renovation, electrical installation, plumbing, and more.\n\nIf you have a specific query or question about one of these companies or their services, I'd be happy to help. Please let me know what you're looking for!"},"done_reason":"stop","done":true,"total_duration":14693765542,"load_duration":18803333,"prompt_eval_count":2048,"prompt_eval_duration":10043000000,"eval_count":86,"eval_duration":4613000000}"
["RawDecoded"]=>
array(11) {
["model"]=>
string(23) "llama3:latest"
["created_at"]=>
string(26) "2024-12-04T22:49:03.13258Z"
["message"]=>
array(2) {
["role"]=>
string(9) "assistant"
["content"]=>
string(467) "I've parsed the context information, which appears to be a collection of company profiles and services offered by various businesses in the construction and contracting industry. The companies listed seem to provide a range of services including building renovation, electrical installation, plumbing, and more.

If you have a specific query or question about one of these companies or their services, I'd be happy to help. Please let me know what you're looking for!"
}
["done_reason"]=>
string(4) "stop"
["done"]=>
bool(true)
["total_duration"]=>
int(14693765542)
["load_duration"]=>
int(18803333)
["prompt_eval_count"]=>
int(2048)
["prompt_eval_duration"]=>
int(10043000000)
["eval_count"]=>
int(86)
["eval_duration"]=>
int(4613000000)
}
["Data"]=>
string(467) "I've parsed the context information, which appears to be a collection of company profiles and services offered by various businesses in the construction and contracting industry. The companies listed seem to provide a range of services including building renovation, electrical installation, plumbing, and more.

If you have a specific query or question about one of these companies or their services, I'd be happy to help. Please let me know what you're looking for!"
["Err"]=>
bool(false)
}
{"success":true,"message":"Datei wurde erfolgreich hochgeladen: "}

<!-- gh-comment-id:2518731896 --> @Steff81 commented on GitHub (Dec 4, 2024): Sorry, but i cannot see a file-id here. This is var_dump of the complete Response Object from the POST /api/v1/files/ $this->rsp->Raw = curl_exec($this->curl); var_dump($this->rsp); object(EmbedDocument)#2 (4) { ["Raw"]=> string(780) "{"model":"llama3:latest","created_at":"2024-12-04T22:49:03.13258Z","message":{"role":"assistant","content":"I've parsed the context information, which appears to be a collection of company profiles and services offered by various businesses in the construction and contracting industry. The companies listed seem to provide a range of services including building renovation, electrical installation, plumbing, and more.\n\nIf you have a specific query or question about one of these companies or their services, I'd be happy to help. Please let me know what you're looking for!"},"done_reason":"stop","done":true,"total_duration":14693765542,"load_duration":18803333,"prompt_eval_count":2048,"prompt_eval_duration":10043000000,"eval_count":86,"eval_duration":4613000000}" ["RawDecoded"]=> array(11) { ["model"]=> string(23) "llama3:latest" ["created_at"]=> string(26) "2024-12-04T22:49:03.13258Z" ["message"]=> array(2) { ["role"]=> string(9) "assistant" ["content"]=> string(467) "I've parsed the context information, which appears to be a collection of company profiles and services offered by various businesses in the construction and contracting industry. The companies listed seem to provide a range of services including building renovation, electrical installation, plumbing, and more. If you have a specific query or question about one of these companies or their services, I'd be happy to help. Please let me know what you're looking for!" } ["done_reason"]=> string(4) "stop" ["done"]=> bool(true) ["total_duration"]=> int(14693765542) ["load_duration"]=> int(18803333) ["prompt_eval_count"]=> int(2048) ["prompt_eval_duration"]=> int(10043000000) ["eval_count"]=> int(86) ["eval_duration"]=> int(4613000000) } ["Data"]=> string(467) "I've parsed the context information, which appears to be a collection of company profiles and services offered by various businesses in the construction and contracting industry. The companies listed seem to provide a range of services including building renovation, electrical installation, plumbing, and more. If you have a specific query or question about one of these companies or their services, I'd be happy to help. Please let me know what you're looking for!" ["Err"]=> bool(false) } {"success":true,"message":"Datei wurde erfolgreich hochgeladen: "}
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#101807