{
  "type": "file-upload",
  "description": "Upload files to S3/fd/gs from a browser picker or param content.",
  "hasChildren": false,
  "propsSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "properties": {
      "label": {
        "description": "Label text displayed above the file upload widget",
        "type": "string"
      },
      "destinationPath": {
        "type": "string",
        "description": "Destination storage path (s3://, fd://, or gs://). Supports $param substitution."
      },
      "sourceMode": {
        "default": "picker",
        "description": "Source for files: picker (browser file picker) or content (param with base64 JSON).",
        "type": "string",
        "enum": [
          "picker",
          "content"
        ]
      },
      "contentParam": {
        "description": "Canvas parameter containing file content as JSON: [{ name, content (base64), contentType? }] or a single object.",
        "type": "string"
      },
      "param": {
        "description": "Optional output parameter. On success, broadcasts a JSON array of { path, fileName } objects.",
        "type": "string"
      },
      "autoUpload": {
        "description": "When true, uploads automatically once the source is ready. Defaults to false for picker and true for content mode.",
        "type": "boolean"
      },
      "uploadLabel": {
        "default": "Upload",
        "type": "string"
      },
      "accept": {
        "description": "Optional accept attribute for the browser file picker.",
        "type": "string"
      },
      "multiple": {
        "default": true,
        "description": "Allow selecting multiple files in picker mode.",
        "type": "boolean"
      },
      "disabled": {
        "default": false,
        "type": "boolean"
      },
      "readOnly": {
        "default": false,
        "description": "If true, blocks local interactions.",
        "type": "boolean"
      },
      "style": {
        "description": "Inline CSS styles as a plain CSS string (e.g., \"color: red; font-size: 16px\")",
        "type": "string"
      }
    },
    "required": [
      "destinationPath"
    ],
    "description": "Uploads files to a configured storage destination after validating write access for the current user token."
  }
}
