github rjsf-team/react-jsonschema-form v0.32.0

latest releases: 5.22.4, v5.22.4, 5.22.3...
8 years ago

Introducing FileWidget (#193)

This library supports a limited form of input[type=file] widgets, in the sense that it will propagate file contents to form data state as data-urls.

There are two ways to use file widgets:

By declaring a string json schema type along a data-url format:

const schema = {
  type: "string",
  format: "data-url",
};

By specifying a ui:widget field uiSchema directive as file:

const schema = {
  type: "string",
};

const uiSchema = {
  "ui:widget": "file",
};
Multiple files

Multiple files selectors are supported by defining an array of strings having data-url as a format:

const schema = {
  type: "array",
  items: {
    type: "string",
    format: "data-url",
  }
};

Note that storing large dataURIs into form state might slow rendering.

Don't miss a new react-jsonschema-form release

NewReleases is sending notifications on new releases.