mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
9 lines
244 B
TypeScript
9 lines
244 B
TypeScript
import type { FileReader } from './request'
|
|
import { readFile } from 'node:fs/promises'
|
|
import { basename } from 'node:path'
|
|
|
|
export const readLocalFile: FileReader = async (path) => ({
|
|
bytes: await readFile(path),
|
|
name: basename(path),
|
|
})
|