mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
15 lines
388 B
TypeScript
15 lines
388 B
TypeScript
|
import { get } from './base'
|
||
|
import type {
|
||
|
FileUploadConfigResponse,
|
||
|
} from '@/models/common'
|
||
|
import { useQuery } from '@tanstack/react-query'
|
||
|
|
||
|
const NAME_SPACE = 'common'
|
||
|
|
||
|
export const useFileUploadConfig = () => {
|
||
|
return useQuery<FileUploadConfigResponse>({
|
||
|
queryKey: [NAME_SPACE, 'file-upload-config'],
|
||
|
queryFn: () => get<FileUploadConfigResponse>('/files/upload'),
|
||
|
})
|
||
|
}
|