Skip to main content
Once a knowledge base is created, its data source cannot be changed later.
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 file size: 15 MB
    • Maximum number of files per upload: 5
    On Dify Cloud, batch uploading is only available on the Professional and Team plans.

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.
For self-hosted deployments, you can adjust the size limit via the environment variable ATTACHMENT_IMAGE_FILE_SIZE_LIMIT.
Each chunk supports up to 10 image attachments; images beyond this limit will not be extracted.For self-hosted deployments, you can adjust this limit via the environment variable SINGLE_CHUNK_ATTACHMENT_LIMIT.
The above extraction rule applies to:
  • Images embedded in DOCX files
    Images embedded in other file types (e.g., PDF) can only be extracted by using appropriate document extraction plugins in knowledge pipelines.
  • Images referenced via accessible URLs using the following Markdown syntax in any file type:
    • ![alt text](image_url)
    • ![alt text](image_url "optional title")
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.