We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
ProFormUploadButton组件 发送请求 是 list,应该需要string
前端请求json
{ "id": "678914eedffc2e74c77ad233", "avatar": "678914e5dffc2e74c77ad21d", "createDate": "2025-01-16T14:17:18.414+00:00", "lastModifiedDate": "2025-01-16T14:17:18.414+00:00", "name": "4444", "portrait": [ { "uid": "rc-upload-1737138388894-7", "lastModified": 1736482202038, "lastModifiedDate": "2025-01-10T04:10:02.038Z", "name": "zk.png", "originFileObj": { "uid": "rc-upload-1737138388894-7" }, "percent": 100, "response": "678aa137ddf4300658100410", "size": 289107, "status": "done", "thumbUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMg", "type": "image/png", "uid": "rc-upload-1737138388894-7", "xhr": {} } ] }
相关代码
<ProFormUploadButton readonly={readonly} name="portrait" label={<FormattedMessage id={'portrait'} />} max={1} // initialValue={value} // valuePropName="file" listType='picture-card' accept='image/*' action={`${API_URL}/files/upload`} fieldProps={{ headers: { 'labic-token': localStorage.getItem(TOKEN_KEY) || '' }, maxCount: 1, }} onChange={(info) => { if (info.file.status === 'uploading') { return; } if (info.file.status === 'done') { if (info.file.response === 'Failed') { info.file.status = 'error' return } } }} />
前端发送请求"portrait":678aa137ddf4300658100410
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
getValueFromEvent={(e) => { if (Array.isArray(e?.fileList) && e.fileList[0]?.response) { return e.fileList[0].response; // 提取 fileId } return initValue; }}
No branches or pull requests
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🐛 bug 描述
ProFormUploadButton组件 发送请求 是 list,应该需要string
📷 复现步骤
前端请求json
相关代码
🏞 期望结果
前端发送请求"portrait":678aa137ddf4300658100410
💻 复现代码
© 版本信息
🚑 其他信息
The text was updated successfully, but these errors were encountered: