Skip to main content

Overview

The File Upload Component enables users to upload or attach files (e.g., images, PDFs, audio files) within QR Code-based landing pages.
It supports multiple file formats with validation and integrates a customizable button component for initiating uploads or downloads.

Properties

PropertyTypeRequiredDescription
fileobject✅ YesFile details including URL, name, and MIME type.
file.urlstring✅ YesURL of the uploaded file. Must follow the allowed file type pattern and be a valid URI.
file.typestringNoFile category (e.g., image, document, audio).
file.mimestringNoMIME type of the file (e.g., image/png, application/pdf).
file.namestringNoOriginal file name as uploaded.
buttonobject✅ YesReference to the Base Button Component. Used for the upload/download action.

🧩 Supported File Types

CategoryExtensions
Images.png, .jpg, .jpeg, .svg, .gif
Documents.pdf, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .odt, .ods, .odp, .txt, .csv
Audio.mp3, .wav, .aac, .m4a
Scripts.js

Used in Categories

This component is used in the following QR Code categories:

Example Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "File Upload Schema",
  "description": "File upload component.",
  "type": "object",
  "required": [
    "file",
    "button"
  ],
  "properties": {
    "file": {
      "type": "object",
      "required": [
        "url"
      ],
      "additionalProperties": false,
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "pattern": "(https?://.*\\.(png|jpeg|jpg|svg|gif|mp3|wav|aac|m4a|pdf|doc|docx|xls|xlsx|ppt|pptx|odt|ods|odp|txt|csv|js|PNG|JPEG|JPG|SVG|GIF|MP3|WAV|AAC|M4A|PDF|DOC|DOCX|XLS|XLSX|PPT|PPTX|ODT|ODS|ODP|TXT|CSV|JS))$"
        },
        "type": {
          "type": "string",
          "description": "Type of the file"
        },
        "mime": {
          "type": "string",
          "description": "MIME type of the file"
        },
        "name": {
          "type": "string",
          "description": "Name of the file"
        }
      }
    },
    "button": {
      "$ref": "_base_button.json"
    }
  }
}

Notes

  • The file.url field must be a valid URL pointing to a supported file type.
  • Both file and button objects are mandatory for schema validity.
  • Use the tracking property inside the button for analytics on user actions.
  • File size restrictions (if any) are handled at the API or upload handler level.