- Correct bug where URL can be too long due to tracking parameters ==> added clean_url function, to be called before adding an URL.

This commit is contained in:
Josako
2025-03-17 17:39:32 +01:00
parent 56a00c2894
commit a6402524ce
3 changed files with 26 additions and 5 deletions

View File

@@ -16,7 +16,7 @@ from common.extensions import db, cache_manager
from common.models.interaction import Specialist, SpecialistRetriever
from common.utils.document_utils import create_document_stack, start_embedding_task, process_url, \
edit_document, \
edit_document_version, refresh_document
edit_document_version, refresh_document, clean_url
from common.utils.eveai_exceptions import EveAIInvalidLanguageException, EveAIUnsupportedFileType, \
EveAIDoubleURLException
from config.type_defs.processor_types import PROCESSOR_TYPES
@@ -444,6 +444,8 @@ def add_url():
tenant_id = session['tenant']['id']
url = form.url.data
url = clean_url(url)
file_content, filename, extension = process_url(url, tenant_id)
catalog_properties = {}