Edit documentation Edit document
GH-Elements

File Element

File is a gh-element that is intended for uploading, saving, and displaying files in applications.

Functional Characteristics

Upload and save files in applications. This way, the files will be stored in GudHub and will always be available online. You can also share them freely with other people.

Value Format

File value format is a file ID that points to the object from file list. Due to that, the gh-element takes all needed data about file and gives an instruments for updating and displaying it.

{
    "field_value": "928019"
}

Element Options

The file element options consists of two blocks. Each of them has only two options.

Field Settings

File field settings contains only standard Field Name and Name Space.

Settings of the file field

Type

Type options allows to select the type of element. Namely, it allows to set a number of files that can be stores in element.

Type of the file

Name Description
Single allows to enter only single value; details...
Multiple allows to enter multiple value; details...

Single

The type single of file element allows to limit the number of files to one.

Multiple

Multiple allows an item to accept more than one file at a time.

Element Style

File element has a standard set of style options and its own interpretations about that you can read in Setting Overview and below in Interpretation section respectively.

Style of the file element

Data Model

File data model contains not only element settings, but also file options.

{
    "data_model":{
        "display_mode": "single",
        "interpretation": []
    }
}
Name Type Description
display_mode string shows the number of files which can be added and displayed in the element
interpretation array contains all file interpretations

Filtration

The only filter that can filter out items by files is Value.

Interpretation

The file element has a quite big list of interpretation types.

Types of the file interpretation

Input

This is the interpretation type that allows upload files in application and display them as icons with an original filename.

Icons of different files

Also, it allows to download file after clicking on it.

Icon

This interpretation simply displays the standard icon. It is an uneditable type.

Url

This type allows to display files URL that was generated in application. After clicking the file will be opened in a new browser window.

File name

As you may have gathered, this interpretation allows to display in application only original filenames. It also works as a link after clicking and opens file in a new browser window.

Value

This is the type of interpretation that displays a link to the file generated in GudHub.