[GH-ISSUE #4523] [BUG]: Problems while I try to use API documents upload #2875

Closed
opened 2026-02-22 18:31:37 -05:00 by yindo · 4 comments
Owner

Originally created by @etcware on GitHub (Oct 10, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4523

Originally assigned to: @angelplusultra on GitHub.

How are you running AnythingLLM?

Docker (local)

What happened?

I'm trying to use the REST APIs, and a couple of get methods work: GET /api/workspaces and GET /api/v1/documents. Note that in one case it works without v1 in URLand in the second only with v1... When I tried without v1, it gave me an HTML response with a status of 200, I suppose indicating an internal error. Now I'm trying POST /api/document/upload/{folder_name} with and without v1, and I always get the same behavior: a status of 200 and an HTML response ... In the following my python client:

import requests
import json
import os

class AnythingLLMClient:
    def __init__(self, base_url: str, api_key: str):
        """
        Inizializza il client per AnythingLLM
        
        Args:
            base_url: URL del server AnythingLLM (es: http://localhost:3001)
            api_key: La tua API key di AnythingLLM
        """
        self.base_url = base_url.rstrip('/')
        # print(self.base_url)
        self.api_key = api_key
        self.headers = {
            'Content-Type': 'application/json',
            'Authorization': f'Bearer {api_key}'
        }
def _make_upload_request(self, folder_name: str, file_path: str, add_to_workspaces: str = None, metadata: dict = None):
        """
        Metodo helper per caricare un documento in una cartella specifica.
        
        Args:
            folder_name (str): Nome della cartella di destinazione.
            file_path (str): Percorso del file da caricare.
            add_to_workspaces (str, opzionale): Stringa con slug dei workspace separati da virgola.
            metadata (dict, opzionale): Dizionario di metadati per il documento.
        """
        print(folder_name)
        print(file_path)
        if not os.path.exists(file_path):
            raise FileNotFoundError(f"File non trovato: {file_path}")
        
        # Costruisce l'URL per l'endpoint specifico
        url = f"{self.base_url}/api/document/upload/{folder_name}"
        print(url)
       # Prepara il payload per multipart/form-data
        form_data = {}
        files = {'file': (os.path.basename(file_path), open(file_path, 'rb'))}

        # Aggiungi i campi form-data se forniti
        if add_to_workspaces:
            form_data['addToWorkspaces'] = add_to_workspaces
        if metadata:
            form_data['metadata'] = json.dumps(metadata)  # Converti il dict in stringa JSON

        # Header: requests aggiungerà automaticamente 'Content-Type: multipart/form-data'
        headers = {'Authorization': f'Bearer {self.api_key}'}

        try:
            response = requests.post(
                url,
                files=files,
                data=form_data,
                headers={'Authorization': f'Bearer {self.api_key}'}
            )

            # STAMPA LA RISPOSTA COMPLETA
            print("\n📥 RISPOSTA COMPLETA DA ANYTHINGLLM")
            print("="*50)
            print(f"Status Code: {response.status_code}")
            print("Headers della Risposta:")
            for header, value in response.headers.items():
                print(f"  {header}: {value}")
            print("Body della Risposta (Testo):")
            print(response.text)
            
            # Tentativo di stampare come JSON se possibile
            try:
                print("\nBody della Risposta (JSON):")
                print(json.dumps(response.json(), indent=2))
            except json.JSONDecodeError:
                print("\nIl corpo della risposta non è un JSON valido, vedi testo sopra.")
            print("="*50)

            response.raise_for_status()
            return response.json()

        except requests.exceptions.RequestException as e:
            print(f"\n❌ Errore nella richiesta API: {e}")
            if 'response' in locals():
                print(f"Response Text: {response.text}")
            return None
        finally:
            files['file'][1].close()
...
...

Are there known steps to reproduce?

No response

Originally created by @etcware on GitHub (Oct 10, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4523 Originally assigned to: @angelplusultra on GitHub. ### How are you running AnythingLLM? Docker (local) ### What happened? I'm trying to use the REST APIs, and a couple of get methods work: GET /api/workspaces and GET /api/v1/documents. Note that in one case it works without v1 in URLand in the second only with v1... When I tried without v1, it gave me an HTML response with a status of 200, I suppose indicating an internal error. Now I'm trying POST /api/document/upload/{folder_name} with and without v1, and I always get the same behavior: a status of 200 and an HTML response ... In the following my python client: ``` import requests import json import os class AnythingLLMClient: def __init__(self, base_url: str, api_key: str): """ Inizializza il client per AnythingLLM Args: base_url: URL del server AnythingLLM (es: http://localhost:3001) api_key: La tua API key di AnythingLLM """ self.base_url = base_url.rstrip('/') # print(self.base_url) self.api_key = api_key self.headers = { 'Content-Type': 'application/json', 'Authorization': f'Bearer {api_key}' } def _make_upload_request(self, folder_name: str, file_path: str, add_to_workspaces: str = None, metadata: dict = None): """ Metodo helper per caricare un documento in una cartella specifica. Args: folder_name (str): Nome della cartella di destinazione. file_path (str): Percorso del file da caricare. add_to_workspaces (str, opzionale): Stringa con slug dei workspace separati da virgola. metadata (dict, opzionale): Dizionario di metadati per il documento. """ print(folder_name) print(file_path) if not os.path.exists(file_path): raise FileNotFoundError(f"File non trovato: {file_path}") # Costruisce l'URL per l'endpoint specifico url = f"{self.base_url}/api/document/upload/{folder_name}" print(url) # Prepara il payload per multipart/form-data form_data = {} files = {'file': (os.path.basename(file_path), open(file_path, 'rb'))} # Aggiungi i campi form-data se forniti if add_to_workspaces: form_data['addToWorkspaces'] = add_to_workspaces if metadata: form_data['metadata'] = json.dumps(metadata) # Converti il dict in stringa JSON # Header: requests aggiungerà automaticamente 'Content-Type: multipart/form-data' headers = {'Authorization': f'Bearer {self.api_key}'} try: response = requests.post( url, files=files, data=form_data, headers={'Authorization': f'Bearer {self.api_key}'} ) # STAMPA LA RISPOSTA COMPLETA print("\n📥 RISPOSTA COMPLETA DA ANYTHINGLLM") print("="*50) print(f"Status Code: {response.status_code}") print("Headers della Risposta:") for header, value in response.headers.items(): print(f" {header}: {value}") print("Body della Risposta (Testo):") print(response.text) # Tentativo di stampare come JSON se possibile try: print("\nBody della Risposta (JSON):") print(json.dumps(response.json(), indent=2)) except json.JSONDecodeError: print("\nIl corpo della risposta non è un JSON valido, vedi testo sopra.") print("="*50) response.raise_for_status() return response.json() except requests.exceptions.RequestException as e: print(f"\n❌ Errore nella richiesta API: {e}") if 'response' in locals(): print(f"Response Text: {response.text}") return None finally: files['file'][1].close() ... ... ``` ### Are there known steps to reproduce? _No response_
yindo added the possible buginvestigating labels 2026-02-22 18:31:37 -05:00
yindo closed this issue 2026-02-22 18:31:37 -05:00
Author
Owner

@timothycarambat commented on GitHub (Oct 10, 2025):

The api is always served under /v1 - you get an HTML page with V1 because it assumes you are trying to reach some page on the frontend so it serves the frontend file.

If an endpoint worked without v1, then it was simply a naming collision for endpoints the frontend uses - which are not reliable to use for custom development. There is a link on the developer API key page that you can open to see every available dev API endpoint. Only those should be used as they wont change often

@timothycarambat commented on GitHub (Oct 10, 2025): The api is always served under `/v1` - you get an HTML page with V1 because it assumes you are trying to reach some page on the frontend so it serves the frontend file. If an endpoint worked without v1, then it was simply a naming collision for endpoints the frontend uses - which are not reliable to use for custom development. There is a link on the developer API key page that you can open to see every available dev API endpoint. Only those should be used as they wont change often
Author
Owner

@etcware commented on GitHub (Oct 11, 2025):

Thanks for the answer in the first two cases, it actually works with v1. This is my output:

url http://localhost:3001/api/v1/workspace/tv
Status Code: 200
Content-Type: application/json; charset=utf-8
Response Text: {"workspace":[{"id":2,"name":"tv","slug":"tv","vectorTag":null,"createdAt":"2025-10-08T08:04:11.154Z","openAiTemp":null,"openAiHistory":20,"lastUpdatedAt":"2025-10-08T08:04:11.154Z","openAiPrompt":nul...
Workspace: {'workspace': [{'id': 2, 'name': 'tv', 'slug': 'tv', 'vectorTag': None, 'createdAt': '2025-10-08T08:04:11.154Z', 'openAiTemp': None, 'openAiHistory': 20, 'lastUpdatedAt': '2025-10-08T08:04:11.154Z', 'openAiPrompt': None, 'similarityThreshold': 0.25, 'chatProvider': None, 'chatModel': None, 'topN': 4, 'chatMode': 'chat', 'pfpFilename': None, 'agentProvider': None, 'agentModel': None, 'queryRefusalResponse': None, 'vectorSearchMode': 'default', 'documents': [], 'threads': []}]}

url http://localhost:3001/api/v1/documents
Status Code: 200
Content-Type: application/json; charset=utf-8
Response Text: {"localFiles":{"name":"documents","type":"folder","items":[{"name":"custom-documents","type":"folder","items":[]},{"name":"tv_contents","type":"folder","items":[]}]}}...
Documents {'localFiles': {'name': 'documents', 'type': 'folder', 'items': [{'name': 'custom-documents', 'type': 'folder', 'items': []}, {'name': 'tv_contents', 'type': 'folder', 'items': []}]}}

In the third case, I'm using the method above, where I inserted v1 into the URL. It's a POST, and something's wrong, and it's returning a 200 status and HTML. My print output is in the following. As you can see the path is with v1 in the URL, but the response is HTML. I'm assuming the error is the one I see in the server log below, which basically says "No direct uploads path found - exiting." I have a folder called tv_contents on the server, so I don't understand the error.

=== FASE 3: Upload su AnythingLLM ===
contents/content__136182.txt
Upload di content__136182.txt...
tv_contents
contents/content__136182.txt
http://localhost:3001/v1/api/document/upload/tv_contents

📥 RISPOSTA COMPLETA DA ANYTHINGLLM
==================================================
Status Code: 200
Headers della Risposta:
  X-Powered-By: Express
  Vary: Origin
  Content-Type: text/html; charset=utf-8
  Content-Length: 1690
  ETag: W/"69a-tVI3FpcWE0szMcTWI5ao83oYY9Y"
  Date: Sat, 11 Oct 2025 06:17:39 GMT
  Connection: keep-alive
  Keep-Alive: timeout=5
Body della Risposta (Testo):

       <!DOCTYPE html>
        <html lang="en">
          <head>
...
            <div id="root" class="h-screen"></div>
          </body>
        </html>
✗ Upload fallito: content__136182.txt

Server log:

...
[backend] info: [119:154]: No direct uploads path found - exiting.
[bg-worker][cleanup-orphan-documents] info: [119:154]: No direct uploads path found - exiting.
[backend] warn: Child process exited with code 0 and signal null
[backend] info: Worker for job "cleanup-orphan-documents" exited with code 0
[backend] info: [MetaGenerator] fetching custom meta tag settings...
@etcware commented on GitHub (Oct 11, 2025): Thanks for the answer in the first two cases, it actually works with v1. This is my output: ``` url http://localhost:3001/api/v1/workspace/tv Status Code: 200 Content-Type: application/json; charset=utf-8 Response Text: {"workspace":[{"id":2,"name":"tv","slug":"tv","vectorTag":null,"createdAt":"2025-10-08T08:04:11.154Z","openAiTemp":null,"openAiHistory":20,"lastUpdatedAt":"2025-10-08T08:04:11.154Z","openAiPrompt":nul... Workspace: {'workspace': [{'id': 2, 'name': 'tv', 'slug': 'tv', 'vectorTag': None, 'createdAt': '2025-10-08T08:04:11.154Z', 'openAiTemp': None, 'openAiHistory': 20, 'lastUpdatedAt': '2025-10-08T08:04:11.154Z', 'openAiPrompt': None, 'similarityThreshold': 0.25, 'chatProvider': None, 'chatModel': None, 'topN': 4, 'chatMode': 'chat', 'pfpFilename': None, 'agentProvider': None, 'agentModel': None, 'queryRefusalResponse': None, 'vectorSearchMode': 'default', 'documents': [], 'threads': []}]} url http://localhost:3001/api/v1/documents Status Code: 200 Content-Type: application/json; charset=utf-8 Response Text: {"localFiles":{"name":"documents","type":"folder","items":[{"name":"custom-documents","type":"folder","items":[]},{"name":"tv_contents","type":"folder","items":[]}]}}... Documents {'localFiles': {'name': 'documents', 'type': 'folder', 'items': [{'name': 'custom-documents', 'type': 'folder', 'items': []}, {'name': 'tv_contents', 'type': 'folder', 'items': []}]}} ``` In the third case, I'm using the method above, where I inserted v1 into the URL. It's a POST, and something's wrong, and it's returning a 200 status and HTML. My print output is in the following. As you can see the path is with v1 in the URL, but the response is HTML. I'm assuming the error is the one I see in the server log below, which basically says "No direct uploads path found - exiting." I have a folder called tv_contents on the server, so I don't understand the error. ``` === FASE 3: Upload su AnythingLLM === contents/content__136182.txt Upload di content__136182.txt... tv_contents contents/content__136182.txt http://localhost:3001/v1/api/document/upload/tv_contents 📥 RISPOSTA COMPLETA DA ANYTHINGLLM ================================================== Status Code: 200 Headers della Risposta: X-Powered-By: Express Vary: Origin Content-Type: text/html; charset=utf-8 Content-Length: 1690 ETag: W/"69a-tVI3FpcWE0szMcTWI5ao83oYY9Y" Date: Sat, 11 Oct 2025 06:17:39 GMT Connection: keep-alive Keep-Alive: timeout=5 Body della Risposta (Testo): <!DOCTYPE html> <html lang="en"> <head> ... <div id="root" class="h-screen"></div> </body> </html> ✗ Upload fallito: content__136182.txt ``` Server log: ``` ... [backend] info: [119:154]: No direct uploads path found - exiting. [bg-worker][cleanup-orphan-documents] info: [119:154]: No direct uploads path found - exiting. [backend] warn: Child process exited with code 0 and signal null [backend] info: Worker for job "cleanup-orphan-documents" exited with code 0 [backend] info: [MetaGenerator] fetching custom meta tag settings... ```
Author
Owner

@etcware commented on GitHub (Oct 13, 2025):

For replicability: I printed request fields.

=== FASE 3: Upload su AnythingLLM ===
contents/content__136182.txt
Upload di content__136182.txt...
request url: http://localhost:3001/v1/api/document/upload/tv_contents
request body: b'--ac1fb4d92e98aa4522559862a047b27a\r\nContent-Disposition: form-data; name="file"; filename="content__136182.txt"\r\n\r\nCome ogni anno la Guida si rivolge agli studenti iscritti all\'Ateneo ed offre una vasta gamma di informazioni necessarie ad orientarsi nel percorso di studio prescelto.\nSi affianca alla Guida il sito dei servizi online degli studenti http://delphi.uniroma2.it/ strumento pratico e semplice e costantemente aggiornato sulle procedure da utilizzare nella realizzazione di un programma di completa digitalizzazione e semplificazione amministrativa.\nLa guida dello studente \xc3\xa8 presente in allegato.\r\n--ac1fb4d92e98aa4522559862a047b27a--\r\n'
request headers: {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Bearer Z9N2SAJ-7CG4BSP-PHWJWTM-MTRMN3Q', 'Content-Length': '648', 'Content-Type': 'multipart/form-data; boundary=ac1fb4d92e98aa4522559862a047b27a'}
response status code: 200
response headers:
  X-Powered-By: Express
  Vary: Origin
  Content-Type: text/html; charset=utf-8
  Content-Length: 1690
  ETag: W/"69a-tVI3FpcWE0szMcTWI5ao83oYY9Y"
  Date: Mon, 13 Oct 2025 08:51:43 GMT
  Connection: keep-alive
  Keep-Alive: timeout=5
response body (Testo):

       <!DOCTYPE html>
        <html lang="en">
          <head>
            <meta charset="UTF-8" [/](https://file+.vscode-resource.vscode-cdn.net/)>
            <meta name="viewport" content="width=device-width, initial-scale=1.0" [/](https://file+.vscode-resource.vscode-cdn.net/)>
            <link type="image/svg+xml" href="/favicon.png" >
...
            <div id="root" class="h-screen"></div>
          </body>
        </html>
✗ Upload fallito: content__136182.txt

And this is my method:

import requests
import json
import os

class AnythingLLMClient:
    def __init__(self, base_url: str, api_key: str):
        """
        Inizializza il client per AnythingLLM
        
        Args:
            base_url: URL del server AnythingLLM (es: http://localhost:3001)
            api_key: La tua API key di AnythingLLM
        """
        self.base_url = base_url.rstrip('/')
        # print(self.base_url)
        self.api_key = api_key
        self.headers = {
            'Content-Type': 'application/json',
            'Authorization': f'Bearer {api_key}'
        }
    ...
    def _make_upload_request(self, folder_name: str, file_path: str, add_to_workspaces: str = None, metadata: dict = None):
        """
        Metodo helper per caricare un documento in una cartella specifica.
        
        Args:
            folder_name (str): Nome della cartella di destinazione.
            file_path (str): Percorso del file da caricare.
            add_to_workspaces (str, opzionale): Stringa con slug dei workspace separati da virgola.
            metadata (dict, opzionale): Dizionario di metadati per il documento.
        """
        if not os.path.exists(file_path):
            raise FileNotFoundError(f"File non trovato: {file_path}")
        
        # Costruisce l'URL per l'endpoint specifico
        url = f"{self.base_url}/v1/api/document/upload/{folder_name}"
        
        # Prepara il payload per multipart/form-data
        form_data = {}
        files = {'file': (os.path.basename(file_path), open(file_path, 'rb'))}

        # Aggiungi i campi form-data se forniti
        if add_to_workspaces:
            form_data['addToWorkspaces'] = add_to_workspaces
        if metadata:
            form_data['metadata'] = json.dumps(metadata)  # Converti il dict in stringa JSON
        
        headers = {'Authorization': f'Bearer {self.api_key}'}

        try:
            if (form_data):
                response = requests.post(
                    url,
                    files=files,
                    data=form_data,
                    headers=headers
                )
            else:
                response = requests.post(
                    url,
                    files=files,
                    headers=headers
                )

            print(f"request url: {response.request.url}")
            print(f"request body: {response.request.body}")
            print(f"request headers: {response.request.headers}")
            print(f"response status code: {response.status_code}")
            print("response headers:")
            for header, value in response.headers.items():
                print(f"  {header}: {value}")
            print("response body (Testo):")
            print(response.text)
            
            # Tentativo di stampare come JSON se possibile
            try:
                print("\nBody della Risposta (JSON):")
                print(json.dumps(response.json(), indent=2))
            except json.JSONDecodeError:
                print("\nIl corpo della risposta non è un JSON valido, vedi testo sopra.")
            print("="*50)

            response.raise_for_status()
            return response.json()

        except requests.exceptions.RequestException as e:
            print(f"\n❌ Errore nella richiesta API: {e}")
            if 'response' in locals():
                print(f"Response Text: {response.text}")
            return None
        finally:
            files['file'][1].close() 
...
@etcware commented on GitHub (Oct 13, 2025): For replicability: I printed request fields. ``` === FASE 3: Upload su AnythingLLM === contents/content__136182.txt Upload di content__136182.txt... request url: http://localhost:3001/v1/api/document/upload/tv_contents request body: b'--ac1fb4d92e98aa4522559862a047b27a\r\nContent-Disposition: form-data; name="file"; filename="content__136182.txt"\r\n\r\nCome ogni anno la Guida si rivolge agli studenti iscritti all\'Ateneo ed offre una vasta gamma di informazioni necessarie ad orientarsi nel percorso di studio prescelto.\nSi affianca alla Guida il sito dei servizi online degli studenti http://delphi.uniroma2.it/ strumento pratico e semplice e costantemente aggiornato sulle procedure da utilizzare nella realizzazione di un programma di completa digitalizzazione e semplificazione amministrativa.\nLa guida dello studente \xc3\xa8 presente in allegato.\r\n--ac1fb4d92e98aa4522559862a047b27a--\r\n' request headers: {'User-Agent': 'python-requests/2.32.5', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Bearer Z9N2SAJ-7CG4BSP-PHWJWTM-MTRMN3Q', 'Content-Length': '648', 'Content-Type': 'multipart/form-data; boundary=ac1fb4d92e98aa4522559862a047b27a'} response status code: 200 response headers: X-Powered-By: Express Vary: Origin Content-Type: text/html; charset=utf-8 Content-Length: 1690 ETag: W/"69a-tVI3FpcWE0szMcTWI5ao83oYY9Y" Date: Mon, 13 Oct 2025 08:51:43 GMT Connection: keep-alive Keep-Alive: timeout=5 response body (Testo): <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" [/](https://file+.vscode-resource.vscode-cdn.net/)> <meta name="viewport" content="width=device-width, initial-scale=1.0" [/](https://file+.vscode-resource.vscode-cdn.net/)> <link type="image/svg+xml" href="/favicon.png" > ... <div id="root" class="h-screen"></div> </body> </html> ✗ Upload fallito: content__136182.txt ``` And this is my method: ``` import requests import json import os class AnythingLLMClient: def __init__(self, base_url: str, api_key: str): """ Inizializza il client per AnythingLLM Args: base_url: URL del server AnythingLLM (es: http://localhost:3001) api_key: La tua API key di AnythingLLM """ self.base_url = base_url.rstrip('/') # print(self.base_url) self.api_key = api_key self.headers = { 'Content-Type': 'application/json', 'Authorization': f'Bearer {api_key}' } ... def _make_upload_request(self, folder_name: str, file_path: str, add_to_workspaces: str = None, metadata: dict = None): """ Metodo helper per caricare un documento in una cartella specifica. Args: folder_name (str): Nome della cartella di destinazione. file_path (str): Percorso del file da caricare. add_to_workspaces (str, opzionale): Stringa con slug dei workspace separati da virgola. metadata (dict, opzionale): Dizionario di metadati per il documento. """ if not os.path.exists(file_path): raise FileNotFoundError(f"File non trovato: {file_path}") # Costruisce l'URL per l'endpoint specifico url = f"{self.base_url}/v1/api/document/upload/{folder_name}" # Prepara il payload per multipart/form-data form_data = {} files = {'file': (os.path.basename(file_path), open(file_path, 'rb'))} # Aggiungi i campi form-data se forniti if add_to_workspaces: form_data['addToWorkspaces'] = add_to_workspaces if metadata: form_data['metadata'] = json.dumps(metadata) # Converti il dict in stringa JSON headers = {'Authorization': f'Bearer {self.api_key}'} try: if (form_data): response = requests.post( url, files=files, data=form_data, headers=headers ) else: response = requests.post( url, files=files, headers=headers ) print(f"request url: {response.request.url}") print(f"request body: {response.request.body}") print(f"request headers: {response.request.headers}") print(f"response status code: {response.status_code}") print("response headers:") for header, value in response.headers.items(): print(f" {header}: {value}") print("response body (Testo):") print(response.text) # Tentativo di stampare come JSON se possibile try: print("\nBody della Risposta (JSON):") print(json.dumps(response.json(), indent=2)) except json.JSONDecodeError: print("\nIl corpo della risposta non è un JSON valido, vedi testo sopra.") print("="*50) response.raise_for_status() return response.json() except requests.exceptions.RequestException as e: print(f"\n❌ Errore nella richiesta API: {e}") if 'response' in locals(): print(f"Response Text: {response.text}") return None finally: files['file'][1].close() ... ```
Author
Owner

@angelplusultra commented on GitHub (Oct 17, 2025):

Hi @etcware. I believe the reason your third example is serving HTML instead of a success response is because your URL in that example is wrong. It is inputted as http://localhost:3001/v1/api/document/upload/tv_contents, notice v1 and api are swapped. it should be api/v1. Full correct URL http://localhost:3001/api/v1/document/upload/tv_contents

Your python code has the wrong URL structure:

# Costruisce l'URL per l'endpoint specifico
        url = f"{self.base_url}/v1/api/document/upload/{folder_name}"
@angelplusultra commented on GitHub (Oct 17, 2025): Hi @etcware. I believe the reason your third example is serving HTML instead of a success response is because your URL in that example is wrong. It is inputted as `http://localhost:3001/v1/api/document/upload/tv_contents`, notice `v1` and `api` are swapped. it should be `api/v1`. Full correct URL `http://localhost:3001/api/v1/document/upload/tv_contents` Your python code has the wrong URL structure: ```py # Costruisce l'URL per l'endpoint specifico url = f"{self.base_url}/v1/api/document/upload/{folder_name}" ```
yindo changed title from [BUG]: Problems while I try to use API documents upload to [GH-ISSUE #4523] [BUG]: Problems while I try to use API documents upload 2026-06-05 14:49:02 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2875