Lowdefy
v3.23.3/input/S3UploadButton/

S3UploadButton

value type: object

The S3UploadButton block allows a user to to upload a file to AWS S3.

The s3PostPolicyRequestId property is required, and should be the id of a AwsS3PresignedPostPolicy request. This request is called by the block when the user uploads a file, to create a policy that allows a file to be uploaded to AWS S3.

The block has an object value in state, with a file key, which has an object corresponding to the last uploaded file, and a fileList array with objects for each the files.

block_id:
  file: null
  fileList: []

id: block_id
type: S3UploadButton

properties:
File types accepted by the input. See html file type input accept property at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept.
block.properties.button:
Name of an Ant Design Icon or properties of an Icon block to use icon in button.
Title text on the button.
The button type.
Disable the file input.

Id of a request of type AwsS3PresignedPostPolicy that defines to which S3 bucket and how the file should be uploaded.

Whether to show default upload list.
Only allow a single file to be uploaded. Only one file can be selected in the prompt and the upload button is disabled after a file is uploaded.
type: object
properties:
  events:
    properties:
      onChange:
        description: Triggered when the upload state is changing.
        type: array
      onClick:
        description: Triggered when the upload button is clicked.
        type: array
    type: object
  properties:
    properties:
      accept:
        description: >-
          File types accepted by the input. See html file type input accept
          property at
          https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept.
        type: string
      button:
        default:
          icon: UploadOutlined
          title: Upload
          type: default
        description: Button block properties.
        type: object
      disabled:
        description: Disable the file input.
        type: boolean
      s3PostPolicyRequestId:
        description: >-
          Id of a request of type AwsS3PresignedPostPolicy that defines to which
          S3 bucket and how the file should be uploaded.
        type: string
      showUploadList:
        default: true
        description: Whether to show default upload list.
        type: boolean
      singleFile:
        default: false
        description: >-
          Only allow a single file to be uploaded. Only one file can be selected
          in the prompt and the upload button is disabled after a file is
          uploaded.
        type: boolean
    required:
      - s3PostPolicyRequestId
    type: object