How to implement customRequest correctly by upload component in antd

now there is a requirement that when I upload a picture, I need a form form item with a user ID. If I follow the default request method of the upload component, I cannot upload any element other than the picture. Now I rewrite customRequest:

.
customRequest = (detail) => {
    console.log(detail)
    uploadPicture && uploadPicture(detail.file).then((res) => {
        console.log(res.success)
    })
}

<Upload
    accept="image/*"
    listType="picture-card"
    fileList={fileList}
    action={`${api.uploadPicture}`}
    multiple={true}
    customRequest={this.customRequest}
    withCredentials={true}
    beforeUpload={this.beforeUpload}
    onChange={handleFileListChange}>
    
                </Upload>

but if you write according to the above, there will actually be a problem, that is, there is no way to update the upload status of the picture. I don"t know how to write the correct customRequest. Can you give me an example

?
Apr.02,2021

it is very complicated to customize a customRequest. It is recommended to throw the user's identity in the header
customRequest-examples


if allowed. It solves my problem

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b396c4-2b9e5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b396c4-2b9e5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?