mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 11:10:01 +08:00
remove JSON format limit, close #1248
This commit is contained in:
parent
7faeab678e
commit
fff4e01f14
@ -112,16 +112,11 @@ const AntUpload = React.createClass({
|
||||
|
||||
onSuccess(response, file) {
|
||||
this.clearProgressTimer();
|
||||
// 服务器端需要返回标准 json 字符串
|
||||
// 否则视为失败
|
||||
try {
|
||||
if (typeof response === 'string') {
|
||||
JSON.parse(response);
|
||||
}
|
||||
} catch (e) {
|
||||
this.onError(new Error('No response'), response, file);
|
||||
return;
|
||||
response = JSON.parse(response);
|
||||
}
|
||||
} catch (e) {/* do nothing */}
|
||||
let fileList = this.state.fileList;
|
||||
let targetItem = getFileItem(file, fileList);
|
||||
// 之前已经删除
|
||||
|
Loading…
Reference in New Issue
Block a user