Files
Riskey 66523cf52b docs: 1.14 release follow-up fixes (#766)
* docs: 1.14 fixes for HITL events and Creator Center env vars (#764)

* docs: reorganize chatflow API tags and surface workflow_run_id

* refactor: update internal tooling for dify-graphon repo split

* fix: surface workflow_run_id in HITL stream events

* chore: tighten env-vars skill source-of-truth rule

* docs: document Creator Center env vars

* fix: use language-prefixed paths for non-api-reference links

* fix: drop redundant workflow_run_id from workflow HITL events

* fix: drop format uuid from chatflow HITL workflow_run_id

* docs: small fixes for self-host, workspace, and CJK disclaimers (#765)

* docs: shorten docker-compose section headings

* docs: update Team plan limit and remove Dataset Operator role

* fix: correct Japanese translation errors in workspace docs

* style: align AI translation disclaimers with CJK spacing rules

* style: add missing space between disclaimer link and particle in ja docs

* fix: point zh general-specifications disclaimer to en source

* fix: drop format uuid from chatflow workflow paused event
2026-04-29 21:47:53 +08:00
..

---
title: 上传本地文件
---

<Note> ⚠️ 本文档由 AI 自动翻译。如有任何不准确之处,请参考 [英文原版](/en/use-dify/knowledge/create-knowledge/import-text-data/readme)。</Note>

<Note>
    知识库创建后,其数据源无法更改。
</Note>

快速创建知识库时,可上传本地文件作为其数据源:

1. 点击 **知识库** > **创建知识库**。

2. 选择 **导入已有文本** 作为数据源,然后上传文件。

    - 单次最多可上传 5 个文件
    
        <Info>
            在 Dify Cloud 上,仅[付费套餐](https://dify.ai/zh/pricing)支持**批量上传**(单次最多 50 个文件)。
        </Info>

    - 单个文件最大支持 15 MB

    <Tip>
        对于自托管部署,可通过环境变量 `UPLOAD_FILE_SIZE_LIMIT` 和 `UPLOAD_FILE_BATCH_LIMIT` 调整这两个限制。
    </Tip>

---

**对于文件中的图片**

    JPG、JPEG、PNG 和 GIF 格式且小于 2 MB 的图片将作为附件,自动提取到对应的分段。这些图片可独立管理,并在检索时与分段一同返回。

    提取的图片 URL 会保留在分段文本中,但你可以放心删除这些 URL 以保持文本整洁——这不会影响已提取的图片。

    若在索引设置中选择多模态嵌入模型(带有 **Vision** 图标),则提取出的图片也将被向量化并索引以供检索。

    每个分段最多支持 10 个图片附件,超出的图片不会被提取。

    <Tip>
        对于自托管部署,可通过环境变量调整以下限制:
    
        - 最大图片尺寸:`ATTACHMENT_IMAGE_FILE_SIZE_LIMIT`
    
        - 每个分段的最大附件数量:`SINGLE_CHUNK_ATTACHMENT_LIMIT`
    </Tip>

    以上提取规则适用于如下图片类型:

    - DOCX 文件中嵌入的图片

        <Tip>
            其他文件类型(如 PDF)中嵌入的图片,可通过在[知识流水线](/zh/use-dify/knowledge/knowledge-pipeline/readme)中使用合适的文档提取插件进行提取。
        </Tip>

    - 在任何文件类型中,通过以下 Markdown 语法引用、URL 可访问的图片:

        - `![alt text](image_url)`
        - `![alt text](image_url "optional title")`