> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 步骤四：上传文件

完成知识流水线的编排、调试并发布成功后，你能通过以下两种方式上传文件：

A. 在发布成功的弹窗哪点击前往文档。进入文档页面后，点击添加文件进行上传。

<div style={{display: 'flex', flexWrap: 'wrap', gap: '30px'}}>
  <div style={{flex: 1, minWidth: '200px'}}>
    <img src="https://mintcdn.com/dify-4171f9f9/vMKCXdVD-5Kdilzi/images/knowledge-base/create-knowledge-pipeline-14.png?fit=max&auto=format&n=vMKCXdVD-5Kdilzi&q=85&s=16dc954da38e1c2478674f2d59ae2d82" alt="方式A-1" width="1093" height="793" data-path="images/knowledge-base/create-knowledge-pipeline-14.png" />
  </div>

  <div style={{flex: 2, minWidth: '300px'}}>
    <img src="https://mintcdn.com/dify-4171f9f9/vMKCXdVD-5Kdilzi/images/knowledge-base/create-knowledge-pipeline-15.png?fit=max&auto=format&n=vMKCXdVD-5Kdilzi&q=85&s=b3d8eef48ab0215264b40e3a3f9fa65d" alt="方式A-2" width="1280" height="545" data-path="images/knowledge-base/create-knowledge-pipeline-15.png" />
  </div>
</div>

B. 在发布的下拉菜单中，点击去添加文档。进入选择数据源页面，选择对应数据源开始上传文件。

<div style={{display: 'flex', flexWrap: 'wrap', gap: '30px'}}>
  <div style={{flex: 1, minWidth: '200px'}}>
    <img src="https://mintcdn.com/dify-4171f9f9/vMKCXdVD-5Kdilzi/images/knowledge-base/create-knowledge-pipeline-16.png?fit=max&auto=format&n=vMKCXdVD-5Kdilzi&q=85&s=bdf029b1ffe61fe1d3f6739ebad29e73" alt="方式B-1" width="669" height="620" data-path="images/knowledge-base/create-knowledge-pipeline-16.png" />
  </div>

  <div style={{flex: 2, minWidth: '300px'}}>
    <img src="https://mintcdn.com/dify-4171f9f9/vMKCXdVD-5Kdilzi/images/knowledge-base/create-knowledge-pipeline-17.png?fit=max&auto=format&n=vMKCXdVD-5Kdilzi&q=85&s=9c7abea1da2282a8d940bda31bde4777" alt="方式B-2" width="1280" height="521" data-path="images/knowledge-base/create-knowledge-pipeline-17.png" />
  </div>
</div>

### 上传流程

1. **选择数据源**\
   从流水线配置的数据源类型中进行选择。目前，Dify 支持 4 种数据源
   **文件上传（pdf, docx 等）、在线网盘（Google Drive, OneDrive 等）、在线文档（Notion)和 网页爬虫（Jina Reader 和 Firecrawl）。**
   请前往 [Dify Marketplace](https://marketplace.dify.ai/) 获取更多数据源支持。

2. **填写文件处理相关参数和变量**\
   如果你在知识流水线的编排过程中配置了用户输入字段，需要在这一步填写所需的参数和变量。完成填写后，点击**预览分段**可进行预览。\
   点击保存并处理完成知识库创建，进入数据处理阶段。
   <Warning>
     注意：分段结构与知识流水线内保持一致，不会因用户输入的文件处理参数和变量而改变。
   </Warning>
   <img src="https://mintcdn.com/dify-4171f9f9/vMKCXdVD-5Kdilzi/images/knowledge-base/create-knowledge-pipeline-18.png?fit=max&auto=format&n=vMKCXdVD-5Kdilzi&q=85&s=47659c9c182593752d46d0407cf4896c" alt="参数填写" width="1280" height="601" data-path="images/knowledge-base/create-knowledge-pipeline-18.png" />

3. **文档处理**\
   跟踪文档处理的进度。嵌入完成后，点击**前往文档**。
   <img src="https://mintcdn.com/dify-4171f9f9/vMKCXdVD-5Kdilzi/images/knowledge-base/create-knowledge-pipeline-19.png?fit=max&auto=format&n=vMKCXdVD-5Kdilzi&q=85&s=2176ac1073695c59718a1931f3314a2b" alt="处理进度" width="1280" height="468" data-path="images/knowledge-base/create-knowledge-pipeline-19.png" />

4. **查看文件列表**\
   点击**前往文档**，前往知识库文档界面。在这里，你可以浏览上传文件数量、处理进程和状态等。
   <img src="https://mintcdn.com/dify-4171f9f9/vMKCXdVD-5Kdilzi/images/knowledge-base/create-knowledge-pipeline-20.png?fit=max&auto=format&n=vMKCXdVD-5Kdilzi&q=85&s=c6a56359e7b5b76135e0c38f6acc349d" alt="文档列表" width="1280" height="831" data-path="images/knowledge-base/create-knowledge-pipeline-20.png" />
