Hex Core JS
    Preparing search index...

    Type Alias FileUploadFieldProps<FV>

    FileUploadFieldProps: BaseFileUploadFieldProps<FV> & {
        accept?: string[];
        autoOpenImageEditor?: boolean;
        format?: FieldFormatFunction<FileFieldUploadFormValues>;
        imageEditorOptions?: ImageEditorOptions;
        imagePreviewSizing?: ImageProps["sizing"];
        Input?: (props: FileUploadFieldInputProps) => JSX.Element | null;
        maxSizeBytes?: number;
        noImageEditor?: boolean;
        onFileChange?: (value: File | null, isInitial: boolean) => void;
        uploadFile?: (
            file: File,
            onProgress?: (progress: Upload.FileUploadProgress) => void,
        ) => Promise<Upload.FileUploadResult>;
        url?: string;
    } & Partial<ClassNameProps & StyleProps>

    Type Parameters

    Type Declaration

    • Optionalaccept?: string[]

      Defines the file types that the input should accept.

    • OptionalautoOpenImageEditor?: boolean

      Passed to the Input.

    • Optionalformat?: FieldFormatFunction<FileFieldUploadFormValues>

      Format function for the value. Controls how the value should be formatted when displayed in smaller contexts where only strings are allowed.

    • OptionalimageEditorOptions?: ImageEditorOptions

      Passed to the Input.

    • OptionalimagePreviewSizing?: ImageProps["sizing"]

      Passed to the Input.

    • OptionalInput?: (props: FileUploadFieldInputProps) => JSX.Element | null

      The input component to use when editing.

    • OptionalmaxSizeBytes?: number

      Maximum file size allowed (in bytes). Overrides the value from settings. Use -1 for no limit.

    • OptionalnoImageEditor?: boolean

      Passed to the Input.

    • OptionalonFileChange?: (value: File | null, isInitial: boolean) => void

      A callback function to inspect the underlying file to get additional information.

      This will be called on the initial load of the file and before the initial load of the file. So take care in update forms.

    • OptionaluploadFile?: (
          file: File,
          onProgress?: (progress: Upload.FileUploadProgress) => void,
      ) => Promise<Upload.FileUploadResult>

      A custom file upload function in case customization is desired.

    • Optionalurl?: string

      The URL of the file (generally only in an update form).