Skip to main content

useFileField

Field hook to access the data of a configurable field with the type file.

Arguments

The hook can take an object as argument with the following properties.

FieldTypeDescription
fieldstringThe name of the field

Returns

The File that the user entered.

Example

src/widgets/example/Example.tsx
import React from 'react'
import {useFileField, ValueFile} from '@modbros/dashboard-sdk'

export default function Example() {
const file: ValueFile | null = useFileField({field: 'example'})

return null
}