How to pass enctype to simpleform in admin-on-rest?
Asked Answered
P

0

6

I am using admin-on-rest. I want to build file upload functionality using simpleform component of admin-on-rest framework.

For this, I want to pass enctype="multipart/form-data" to form.

I am not able find any documentation or forums to understand, how can I pass this, if inside any props, or some other way.

Please help with this.

Below is my code snippet:

<Create {...props}>
    <SimpleForm enctype="multipart/form-data">
        <FileInput source="files" label="Related files" multiple accept="text/*,image/*">
            <FileField source="src" title="title" />
        </FileInput>
    </SimpleForm>
</Create>
Priam answered 4/1, 2018 at 13:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.