mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-27 13:28:32 +07:00
* Refine docs based on internal feedback * update the zh and ja docs --------- Co-authored-by: Riskey <riskey47@dify.ai>
58 lines
2.1 KiB
Plaintext
58 lines
2.1 KiB
Plaintext
---
|
|
title: Upload Local Files
|
|
---
|
|
|
|
<Note>
|
|
Once a knowledge base is created, its data source cannot be changed later.
|
|
</Note>
|
|
|
|
When quick-creating a knowledge base, you can upload local files as its data source:
|
|
|
|
1. Click **Knowledge** > **Create Knowledge**.
|
|
|
|
2. Select **Import from file** as the data source, then upload your files.
|
|
|
|
- Maximum number of files per upload: 5
|
|
|
|
<Info>
|
|
On Dify Cloud, **batch uploading** (up to 50 files per upload) is only available on [paid plans](https://dify.ai/pricing).
|
|
</Info>
|
|
|
|
- Maximum file size: 15 MB
|
|
|
|
<Tip>
|
|
For self-hosted deployments, you can adjust these two limits via the environment variables `UPLOAD_FILE_SIZE_LIMIT` and `UPLOAD_FILE_BATCH_LIMIT`.
|
|
</Tip>
|
|
|
|
---
|
|
|
|
**For Images in Uploaded Files**
|
|
|
|
JPG, JPEG, PNG, and GIF images under 2 MB are automatically extracted as attachments to their corresponding chunks. These images can be managed independently and are returned alongside their chunks during retrieval.
|
|
|
|
Each chunk supports up to 10 image attachments; images beyond this limit will not be extracted.
|
|
|
|
<Tip>
|
|
For self-hosted deployments, you can adjust the following limits via environment variables:
|
|
|
|
- Maximum image size: `ATTACHMENT_IMAGE_FILE_SIZE_LIMIT`
|
|
|
|
- Maximum number of attachments per chunk: `SINGLE_CHUNK_ATTACHMENT_LIMIT`
|
|
</Tip>
|
|
|
|
The above extraction rule applies to:
|
|
|
|
- Images embedded in DOCX files
|
|
|
|
<Note>
|
|
Images embedded in other file types (e.g., PDF) can only be extracted by using appropriate document extraction plugins in [knowledge pipelines](/en/use-dify/knowledge/knowledge-pipeline/readme).
|
|
</Note>
|
|
|
|
- Images referenced via accessible URLs using the following Markdown syntax in any file type:
|
|
|
|
- ``
|
|
- ``
|
|
|
|
<Tip>
|
|
If you select a multimodal embedding model (indicated by the **Vision** icon) in subsequent index settings, the extracted images will be embedded and indexed for retrieval.
|
|
</Tip> |