React-admin: multi-part example

Created on 19 Jun 2017  路  4Comments  路  Source: marmelab/react-admin

Is it possible to write a small function for a custom restClient that loops through specific fields and turns them to multi-part data when form submitted.

For example, this function can have an array of defined fields where it needs to loop.

 let finputs = ["first_field", "second_field", "Other_fields"];

 function covertTomutiPart(finput)

We can add this to our restClient?

All 4 comments

The admin-on-rest core team doesn't provide support or advice on debugging your own project. We need to focus on writing documentation, fixing bugs, and adding new features.

Instead, we've decided to offload that charge to the community, by moving support to StackOverflow. Ask your question there, you will find helpful people (sometimes from the core team, too). Besides, the response to your question will be easy to find for future developers with a similar problem.

And once you get a response, please continue to hang out on the admin-on-rest channel in StackOverflow. That way, you can help newcomers and share your expertise.

http://stackoverflow.com/questions/tagged/admin-on-rest

@ceddyb Did you get a chance to use a multipart for data to send a request?

@sbatururimi unfortunately i wasn't able to do it, i made a separate dashboard for file uploads

Also you can implement next wrapper like image file upload here: https://github.com/marmelab/admin-on-rest/blob/master/docs/RestClients.md#decorating-your-rest-client-example-of-file-upload
Your wrapper could be look like this:
Example

Was this page helpful?
0 / 5 - 0 ratings