Feat/customizable file upload config (#818)
This commit is contained in:
parent
b7c29ea1b6
commit
155a4733f6
13 changed files with 122 additions and 83 deletions
|
|
@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'
|
|||
import cn from 'classnames'
|
||||
import { XMarkIcon } from '@heroicons/react/20/solid'
|
||||
import s from './index.module.css'
|
||||
import type { File } from '@/models/datasets'
|
||||
import type { CustomFile as File } from '@/models/datasets'
|
||||
import { fetchFilePreview } from '@/service/common'
|
||||
|
||||
type IProps = {
|
||||
|
|
@ -37,7 +37,7 @@ const FilePreview = ({
|
|||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (file) {
|
||||
if (file?.id) {
|
||||
setLoading(true)
|
||||
getPreviewContent(file.id)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue