How to get server callback after uploading the Upload component of antd?

Business requirement is that after uploading an image, the backend returns a string of id, frontend, which needs to be inserted into the img tag with this id stitching path for display.

the problem encountered is that the image has been uploaded successfully, but the callback function of the Upload component can only tell whether the upload is successful or not. It seems that the returned data from the server cannot be obtained. What should I do?

clipboard.png

this is the Upload document: http://lucifier129.github.io/.

Feb.27,2021

what is returned by your server


solves the problem that it is not the Upload component, but the mismatch between the name parameters and the backend.

Menu