{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "File upload",
    "name": "bbFileUpload",
    "description": "",
    "type": "object",
    "properties": {
        "bbFileUpload": {
            "type": "object",
            "properties": {
                "acceptedFileTypes": {
                    "type": "array",
                    "description": "A collection of file types we are willing to accept. These are a mixture of MIME types and file extensions due to the fact that the browser will give a blank string for types it does not recognise from the HTTP 1.1 specification so in those cases we must check the file extension manually.",
                    "items": {
                        "type": "string",
                        "enum": [
                            "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
                            "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                            "application/vnd.openxmlformats-officedocument.presentationml.presentation",
                            "application/vnd.ms-excel",
                            "application/msword",
                            "application/vnd.ms-powerpoint",
                            ".doc",
                            ".docx",
                            ".xls",
                            ".xlsx",
                            ".ppt",
                            ".pptx",
                            "application/pdf",
                            "text/plain",
                            "text/csv",
                            "image/*"
                        ]
                    }
                },
                "prettyFileTypes": {
                    "type": "array",
                    "description": "A human readable list of accepted file types.",
                    "items": {
                        "type": "string",
                        "enum": [
                            "images",
                            ".pdf",
                            ".doc/docx",
                            ".xls/xlsx",
                            ".ppt/pptx",
                            ".txt",
                            ".csv"
                        ]
                    }
                },
                "maxSize": {
                    "type": "string",
                    "description": "The maximum accepted file size.",
                    "default": "20MB"
                }
            },
            "required": [
                "acceptedFileTypes",
                "prettyFileTypes",
                "maxSize"
            ]
        }
    },
    "required": [
        "bbFileUpload"
    ]
}
