0
votes

I have canvas editor component that provide me base64 image data in SimpleForm of react-admin How can i upload the image file to server ? i am using data provider : https://github.com/benwinding/react-admin-firebase

 <Create {...props}>
        <SimpleForm>
            <TextInput source='location_name'/>
            <EditorComponent  />
        </SimpleForm>
    </Create>

I am new react and react-admin

1

1 Answers

0
votes

You can turn your component in the Input using the <Field> component or HOC addField() and save the image in base64 as part of the form:

https://marmelab.com/react-admin/Inputs.html#writing-your-own-input-component

https://redux-form.com/6.5.0/docs/api/field.md/