上传时 formdata 不添加空元素 (#2259)

Co-authored-by: cy <chenyi08@kuaishou.com>
This commit is contained in:
cyboning 2021-07-13 10:39:06 +08:00 committed by GitHub
parent 3d1eaf18ac
commit b91ad043ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1043,6 +1043,7 @@ export default class ImageControl extends React.Component<
if (api.data) {
qsstringify(api.data)
.split('&')
.filter(item => item !== '')
.forEach(item => {
let parts = item.split('=');
fd.append(parts[0], decodeURIComponent(parts[1]));