{
  "schemaVersion": 1,
  "generatedBy": "generation/forms_p7.py",
  "note": "SAMPLE upload rules. HTML cannot express size or count limits, so an application must apply these.",
  "controls": [
    {
      "form": "upload-accept-images.html",
      "name": "any_image",
      "accept": "image/*",
      "maxBytes": 5242880,
      "maxFiles": 1,
      "enforcedByHtml": [
        "accept"
      ]
    },
    {
      "form": "upload-accept-images.html",
      "name": "camera_capture",
      "accept": "image/*",
      "capture": "environment",
      "maxBytes": 8388608,
      "maxFiles": 1,
      "enforcedByHtml": [
        "accept",
        "capture"
      ]
    },
    {
      "form": "upload-accept-documents.html",
      "name": "pdf_only",
      "accept": "application/pdf",
      "maxBytes": 10485760,
      "maxFiles": 1,
      "enforcedByHtml": [
        "accept",
        "required"
      ]
    },
    {
      "form": "upload-multiple-and-limits.html",
      "name": "batch",
      "accept": ".png,.jpg,.pdf",
      "maxBytes": 5242880,
      "maxFiles": 10,
      "enforcedByHtml": [
        "accept",
        "multiple"
      ]
    },
    {
      "form": "upload-multiple-and-limits.html",
      "name": "single_large",
      "accept": ".zip",
      "maxBytes": 52428800,
      "maxFiles": 1,
      "enforcedByHtml": [
        "accept"
      ]
    },
    {
      "form": "upload-multipart-encoding.html",
      "name": "photo_evidence",
      "accept": "image/*",
      "maxBytes": 5242880,
      "maxFiles": 1,
      "enforcedByHtml": [
        "accept"
      ]
    },
    {
      "form": "upload-multipart-encoding.html",
      "name": "receipt",
      "accept": "application/pdf,.pdf",
      "maxBytes": 5242880,
      "maxFiles": 1,
      "enforcedByHtml": [
        "accept"
      ]
    }
  ],
  "rejectionCodes": [
    {
      "code": "TOO_LARGE",
      "message": "That file is larger than the stated limit"
    },
    {
      "code": "TOO_MANY",
      "message": "Choose fewer files"
    },
    {
      "code": "WRONG_TYPE",
      "message": "That file type is not accepted here"
    },
    {
      "code": "EMPTY",
      "message": "That file has no content"
    }
  ]
}
