You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever I hit save on the form I see the following error logged from the server:
error CastError: Cast to ObjectId failed for value "[]" at path "avatar"
at new CastError (server\node_modules\mongoose\lib\error\cast.js:39:11)
at ObjectId.cast (server\node_modules\mongoose\lib\schema\objectid.js:246:11)
When I inspect the post request I do see it sending an empty array as the field which makes me think that's likely where the error is coming from, the POST request is:
I think this is an issue with how the uploaded files are being mapped to the fields but first wanted to see if you saw anything I had missed. I also wanted to thank you for providing the ra-strapi-rest as it did save me a ton of time in getting an example application up and running with React-Admin
The text was updated successfully, but these errors were encountered:
I am working on a small example application to get familiar with Strapi and React-Admin and am attempting to upload an image using the ImageInput component. I feel like I've read your documentation at https://github.com/nazirov91/ra-strapi-rest#file-upload and React-Admins at ImageInput at https://marmelab.com/react-admin/Inputs.html.
Right now I only have a single field that allows file upload so my
App.js
has:And is being passed in verbatim as what you've written in the documentation:
For my create screen I also have your code verbatim as:
Inside of my
person.settings.json
the field is referenced as:Whenever I hit save on the form I see the following error logged from the server:
When I inspect the post request I do see it sending an empty array as the field which makes me think that's likely where the error is coming from, the POST request is:
I think this is an issue with how the uploaded files are being mapped to the fields but first wanted to see if you saw anything I had missed. I also wanted to thank you for providing the
ra-strapi-rest
as it did save me a ton of time in getting an example application up and running with React-AdminThe text was updated successfully, but these errors were encountered: