> ## 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'}}>
    <Frame>
      <img src="https://mintcdn.com/dify-4171f9f9/jtqUuvvShgl3RqV6/images/use-dify/knowledge/create-knowledge-pipeline-14.png?fit=max&auto=format&n=jtqUuvvShgl3RqV6&q=85&s=21fe980990edadc006ceafd8230dffa8" alt="方式A-1" width="1093" height="793" data-path="images/use-dify/knowledge/create-knowledge-pipeline-14.png" />
    </Frame>
  </div>

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

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

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

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

### 上传流程

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

2. **填写文件处理相关参数和变量**\
   如果你在知识流水线的编排过程中配置了用户输入字段，需要在这一步填写所需的参数和变量。完成填写后，点击 **预览分段** 可进行预览。\
   点击保存并处理完成知识库创建，进入数据处理阶段。

   <Warning>
     注意：分段结构与知识流水线内保持一致，不会因用户输入的文件处理参数和变量而改变。
   </Warning>

   <Frame>
     <img src="https://mintcdn.com/dify-4171f9f9/jtqUuvvShgl3RqV6/images/use-dify/knowledge/create-knowledge-pipeline-18.png?fit=max&auto=format&n=jtqUuvvShgl3RqV6&q=85&s=a8f37f8027350fe9f04125008a006e5b" alt="参数填写" width="1280" height="601" data-path="images/use-dify/knowledge/create-knowledge-pipeline-18.png" />
   </Frame>

3. **文档处理**\
   跟踪文档处理的进度。嵌入完成后，点击 **前往文档**。

   <Frame>
     <img src="https://mintcdn.com/dify-4171f9f9/jtqUuvvShgl3RqV6/images/use-dify/knowledge/create-knowledge-pipeline-19.png?fit=max&auto=format&n=jtqUuvvShgl3RqV6&q=85&s=effc1747141d6f166c3b4a143da24ebc" alt="处理进度" width="1280" height="468" data-path="images/use-dify/knowledge/create-knowledge-pipeline-19.png" />
   </Frame>

4. **查看文件列表**\
   点击 **前往文档**，前往知识库文档界面。在这里，你可以浏览上传文件数量、处理进程和状态等。

   <Frame>
     <img src="https://mintcdn.com/dify-4171f9f9/jtqUuvvShgl3RqV6/images/use-dify/knowledge/create-knowledge-pipeline-20.png?fit=max&auto=format&n=jtqUuvvShgl3RqV6&q=85&s=2b627d0ed7ba436a009b1451729c04c3" alt="文档列表" width="1280" height="831" data-path="images/use-dify/knowledge/create-knowledge-pipeline-20.png" />
   </Frame>
