mirror of
https://github.com/langgenius/dify.git
synced 2025-07-04 23:57:12 +00: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'),
|
||
|
})
|
||
|
}
|