Closed modbender closed 3 years ago
Ok I just checked the source code, and seen that onSuccess
does have a append
field. But for cases where customRequest
is not defined, it's best to have something similar to source
that helps define extra fields.
Maybe object data created using response with a prop called aliases can be added to the image object.
<RUG
...
alias={(response) => ({
slug: response.slug
})}
/>
That's a good idea.
I'm using Django Rest API for image upload/delete or any modification. The problem is that I need extra fields such as ID for the database object created for the uploaded image to be accessible from
onDeleted
to be able to delete it using the backend API.I would also like it if I'm able to save additional fields inside state image data.