{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "description": "# drayman-file-uploader\n\nFile uploader powered by [FilePond](https://pqina.nl/filepond/) library.\n\n## Example of usage\n\n![](media://drayman-file-uploader.gif)\n\n```typescript\nmodule.exports = async ({ forceUpdate }) => {\n     let file;\n\n     // File has been uploaded\n     const onUpload = async (_, files) => {\n         file = files[0];\n         await forceUpdate();\n         return '123';\n     }\n\n     return () => [\n         <drayman-file-uploader\n             key=\"file-upload\"\n             onUpload={onUpload}\n         />,\n         <html key=\"info\">\n             {file &&\n                 <img\n                     src={`data:${file.mimeType};base64,${file.buffer.toString('base64')}`}\n                     style={{ width: '200px;' }}\n                 />\n             }\n         </html>\n     ]\n}\n```",
    "properties": {
        "allowMultiple": {
            "description": "Wether multiple file upload is allowed or not.",
            "type": "boolean"
        },
        "initialFiles": {
            "description": "Array of files to show when uploader element appears.",
            "items": {
                "properties": {
                    "downloadUrl": {
                        "description": "URL that starts a download of this file.",
                        "type": "string"
                    },
                    "fileName": {
                        "description": "Name of the uploaded file.",
                        "type": "string"
                    },
                    "id": {
                        "description": "Unique file ID.",
                        "type": "string"
                    },
                    "length": {
                        "description": "Size of the file in bytes.",
                        "type": "number"
                    }
                },
                "required": [
                    "downloadUrl",
                    "fileName",
                    "id",
                    "length"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "onRemoveUploaded": {
            "description": "Executed when user wants to remove a file.\nReceives unique file ID `fileId`.\nThis function is usually used to remove a specific file from file system.",
            "type": "object"
        },
        "onUpload": {
            "description": "Executed when file is uploaded.\nThis function contains uploaded file and must return a unique file ID.\nThis unique ID is then used to revert uploads.",
            "type": "object"
        }
    },
    "type": "object"
}

