Class: FileInput

FormComponents. FileInput


new FileInput()

A file input component to handle uploading files
Very slightly modified from https://github.com/paramaggarwal/react-dropzone

Properties:
Name Type Description
options object
onFileSelect function
label string
helpText string
accept string
Source:
See:

Methods


<static> _buildAcceptString()

_buildAcceptString

Source:
Returns:
Type
null

<static> _handleChange()

Handles any changes made to the bound resource at the passed field key.

Source:
Returns:
Type
null

<static> _shouldRenderBackground()

Decides what background should be shown on the file upload component.
Either the uploaded image's preview, the file upload status, or the help text.

Source:
Returns:
Type
jsx

<static> componentWillReceiveProps(nextProps)

Handles recieving updated properties and setting the new properties to state.

Parameters:
Name Type Description
nextProps object

The updated properties being passed to this component.

Source:
Returns:
Type
null

<static> getInitialState()

getInitialState

Source:
Returns:

The initial state of this component

Type
object

<static> handleClick()

Handles clicks and fires the open action

Source:
Returns:
Type
null

<static> handleDragLeave(event)

Handles when a dragged item leaves the component bounds and updates state

Parameters:
Name Type Description
event event

The event triggering this event.

Source:
Returns:
Type
null

<static> handleDragOver(event)

Handles when a dragged item enters the component bounds and updates state

Parameters:
Name Type Description
event event

The event triggering this event.

Source:
Returns:
Type
null

<static> handleDrop(event)

Handles the dropping of a file into this component.
After drop, handles encoding the file to the proper encoding standard.

Parameters:
Name Type Description
event event

The drop event.

Source:
Returns:
Type
null

<static> open()

Opens the file input dialaog window

Source:
Returns:
Type
null

<static> render()

Renders the component

Source:
Returns:
Type
jsx