Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

386 B
Raw Blame
import { documentUploadFileExtension } from './policy'

const LOCAL_TEXT_PREVIEW_EXTENSIONS = new Set([
  'csv',
  'htm',
  'html',
  'json',
  'jsonl',
  'markdown',
  'md',
  'text',
  'txt',
])

export function canPreviewLocalFile(file: File) {
  const extension = documentUploadFileExtension(file.name)
  return extension === 'pdf' || LOCAL_TEXT_PREVIEW_EXTENSIONS.has(extension)
}