@lowdefy/plugin-aws
Version:
To securely upload files to S3, the `S3UploadButton` or `S3UploadPhoto` blocks can be used. S3 file downloads can be done by getting a presigned URL using a `AwsS3PresignedGetObject` request and opening the URL in a new tab which will result in the browse
88 lines (87 loc) • 2.67 kB
JSON
{
"type": "object",
"properties": {
"type": "object",
"required": ["s3PostPolicyRequestId"],
"properties": {
"accept": {
"type": "string",
"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."
},
"button": {
"type": "object",
"description": "Button block properties.",
"default": {
"icon": "UploadOutlined",
"title": "Upload",
"type": "default"
},
"docs": {
"displayType": "button"
}
},
"disabled": {
"type": "boolean",
"description": "Disable the file input."
},
"maxCount": {
"type": "number",
"description": "Maximum number of files that can be uploaded."
},
"s3PostPolicyRequestId": {
"type": "string",
"description": "Id of a request of type AwsS3PresignedPostPolicy that defines to which S3 bucket and how the file should be uploaded.",
"docs": {
"displayType": "manual",
"block": {
"id": "block_properties_s3PostPolicyRequestId",
"layout": { "_global": "settings_input_layout" },
"type": "Label",
"required": true,
"properties": {
"title": "s3PostPolicyRequestId",
"span": 8,
"align": "right"
},
"blocks": [
{
"id": "block_properties_s3PostPolicyRequestId_text",
"type": "Markdown",
"style": {
"color": "#8c8c8c"
},
"properties": {
"content": "Id of a request of type AwsS3PresignedPostPolicy that defines to which S3 bucket and how the file should be uploaded."
}
}
]
},
"getter": {}
}
},
"showUploadList": {
"type": "boolean",
"default": true,
"description": "Whether to show default upload list."
},
"singleFile": {
"type": "boolean",
"default": false,
"description": "Only allow a single file to be uploaded. Only one file can be selected in the prompt."
}
}
},
"events": {
"type": "object",
"properties": {
"onChange": {
"type": "array",
"description": "Triggered when the upload state is changing."
},
"onClick": {
"type": "array",
"description": "Triggered when the upload button is clicked."
}
}
}
}