How can I send an attribute other than data to the request in "onFinish"?(ant.design, strapi v4)
I want to upload file(strapi v4 mediatype).
Strapi V4 Example
Refine(Ant Design) Example
2 Replies
Hi, I am refine support bot :wave:. I am here to help you with your question. I searched for the answer to your question in the refine documentation and found an answer! 🏆 If this is the answer you need, then we are very lucky. If not, please wait for someone from the refine core team or the community to try to help you.
Answer: You can send an attribute other than data to the request in "onFinish" by using the
Answer: You can send an attribute other than data to the request in "onFinish" by using the
transformValues
option in the hook's options.
SOURCES: ./docs/api-reference/mantine/hooks/form/useForm.mdoptimistic-gold•2y ago
Hi, sorry i don't understand what yo try to achive.
yes you can add any value to here. what is the error ?
Can you help me understand a little more? 😦
oh i guess i understand. do you wanna add another field to request payload ?
as you can see here data provider works with that way
https://github.com/refinedev/refine/blob/next/packages/strapi-v4/src/dataProvider.ts#L266
- you can override data provider update function
https://refine.dev/docs/faq/#how-i-can-override-specific-function-of-data-providers
if you need that customization in all functions, ofc you can use strapi-v4 data-provider as a starter