onDrop: function(files) {
        var cookie = Cookie.parse(document.cookie);
        var xhr = new XMLHttpRequest();
        xhr.open('POST', '/api/addapet');
        xhr.setRequestHeader('X-CSRF-Token', cookie.crumb);
        xhr.send(files);
    },
    [...]
        var formElements;
        if (!this.state.success) {
            formElements =
                <div>
                    <Dropzone onDrop={this.onDrop} size={150} >
                        <div> Drop files here, or click and select multiple files to upload.</div>
                    </Dropzone>
                </div>;
        }

        return (
            <section>
                <h1 className="page-header">Sign up</h1>
                <form ref="imageForm" method="POST" action="api/addapet" encType="multipart/form-data">
                    {alerts}
                    {formElements}
                </form>
            </section>
        );
        
    }