infiniflow/ragflow · error · RuntimeError

100

100

Error message

This type of file has not been supported yet!

What it means

Raised during upload-to-dataset when the generated document filename's extension is classified by filename_type() as FileType.OTHER, i.e. an extension RAGFlow's parser registry does not recognize. The upload path force-appends '.pdf' after fetching a document as a PDF blob, so in practice this fires when the name/deduplication logic or filename_type mapping yields an unrecognized extension.

Source

Thrown at api/apps/restful_apis/document_api.py:578

    try:
        blob = await thread_pool_exec(html2pdf, url)
    except Exception as e:
        logging.warning("html2pdf failed for %s, %s", dataset_id, str(e))
        return get_error_data_result(message=str(e), code=RetCode.SERVER_ERROR)
    if not blob:
        return server_error_response(ValueError("Download failure."))

    root_folder = FileService.get_root_folder(tenant_id)
    FileService.init_knowledgebase_docs(root_folder["id"], tenant_id)
    kb_root_folder = FileService.get_kb_folder(tenant_id)
    kb_folder = FileService.new_a_file_from_kb(kb.tenant_id, kb.name, kb_root_folder["id"])

    try:
        filename = duplicate_name(DocumentService.query, name=f"{name}.pdf", kb_id=kb.id)
        filetype = filename_type(filename)
        if filetype == FileType.OTHER.value:
            raise RuntimeError("This type of file has not been supported yet!")

        location = filename
        while settings.STORAGE_IMPL.obj_exist(dataset_id, location):
            location += "_"
        settings.STORAGE_IMPL.put(dataset_id, location, blob)

        doc = {
            "id": get_uuid(),
            "kb_id": kb.id,
            "parser_id": kb.parser_id,
            "pipeline_id": kb.pipeline_id,
            "parser_config": kb.parser_config,
            "created_by": tenant_id,
            "type": filetype,
            "name": filename,
            "location": location,
            "size": len(blob),
            "thumbnail": thumbnail(filename, blob),

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Use a simple ASCII document name with a standard .pdf extension and retry.
  2. Check filename_type()'s supported-extension table in the running code to see which suffixes map to real parsers.
  3. If deploying a fork, ensure custom parser extensions are registered in both filename_type and the parser factory.
  4. Inspect the computed `filename` variable in logs to see what deduplication produced.
Defensive patterns

Strategy: validation

Validate before calling

from api import settings

def is_supported_name(filename):
    from api.utils.file_utils import filename_type
    from api.db import FileType
    return filename_type(filename) != FileType.OTHER.value

assert is_supported_name(f"{name}.pdf"), f"{name}.pdf maps to an unsupported parser"

Try / catch

try:
    doc = upload_document_to_dataset(dataset_id, name, blob)
except RuntimeError as e:
    if "not been supported" in str(e):
        raise ValueError("Rename the document with a supported extension (e.g. .pdf)") from e
    raise

Prevention

When it happens

Trigger: POST a document by URL/blob to a dataset where the deduplicated filename (name + '.pdf' + possible '_' suffixes from obj_exist collisions) still resolves to an unmapped extension, or where filename_type's extension table lacks the produced suffix (e.g. case/format edge cases in the name such as trailing dots or unicode).

Common situations: Upstream code changes to filename_type or duplicate_name, unusual document names (trailing spaces/dots, double extensions), or a partially upgraded deployment where the supported-extension table and this endpoint disagree.

Related errors


AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15). Data as JSON: /api/errors/16a668d0d3be4837. Report an issue: GitHub.