如果是 api/proxy 则由后端实现
This commit is contained in:
parent
093f6789b8
commit
2621fe736e
|
@ -558,7 +558,14 @@ export default class ImageControl extends React.Component<ImageProps, ImageState
|
|||
const data = this.props.data;
|
||||
reciever = filter(reciever, data);
|
||||
const fileField = this.props.fileField || 'file';
|
||||
fd.append(fileField, file, (file as File).name);
|
||||
|
||||
if (/^\/api\/(?:page\/)?proxy/.test(reciever)) {
|
||||
fd.append('file', file, (file as File).name);
|
||||
fd.append('fieldName', fileField);
|
||||
} else {
|
||||
fd.append(fileField, file, (file as File).name);
|
||||
}
|
||||
|
||||
const idx = reciever.indexOf('?');
|
||||
|
||||
if (~idx && params) {
|
||||
|
|
Loading…
Reference in New Issue