Closed kalra-nitish closed 4 years ago
Hi, and thanks for your question. As explained in the react-admin contributing guide, the right place to ask a "How To" question, get usage advice, or troubleshoot your own code, is StackOverFlow.
This makes your question easy to find by the core team, and the developer community. Unlike Github, StackOverFlow has great SEO, gamification, voting, and reputation. That's why we chose it, and decided to keep GitHub issues only for bugs and feature requests.
So I'm closing this issue, and inviting you to ask your question at:
http://stackoverflow.com/questions/tagged/react-admin
And once you get a response, please continue to hang out on the react-admin channel in StackOverflow. That way, you can help newcomers and share your expertise!
https://stackoverflow.com/questions/61768558/not-able-to-upload-image-with-imagefield-in-edit-mode-for-react-admin https://stackoverflow.com/questions/53590879/how-to-display-imageinput-src-in-another-component-on-react-admin https://stackoverflow.com/questions/54718733/how-to-pre-populate-the-imagefield-inside-imageinput-in-edit-form-or-the-right
If you think this is a bug, please open a new issue by following the issue template (and include a repro).
What you were expecting: I am expecting the uploaded image to get edited in the EDIT form.
What happened instead: Not able to fetch the image from the record with ImageField inside ImageInput
Steps to reproduce: 1.) Using React Admin I am creating a dashboard for one of my clients and I have a requirement where I have to add the products of the client, out of the many fields there is one Image field too where I have to upload an image which serves in the API and the product is created with CREATE of react-admin.
Once a product is created I need to EDIT that product too, and with the same respect, I need to update the Image too.
The issue with EditProduct is I am not able to fetch the image from the record which is a URL with the help of ImageField used inside ImageInput and in order to achieve that I've created a separate component PreviewImage which fetched the image from the record and render it in img tag, but I would like to upload the new image too to the edit product form. And I'm not able to achieve that with current documentation present in react-admin. If anyone is aware of how I could achieve this EDIT functionality through react-admin, please post your solutions.