From 4d62306be71cef7d62059f07199426f96353c412 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 03 一月 2020 16:07:44 +0800 Subject: [PATCH] 2020-01-03 --- src/tabviews/tableshare/fileupload/index.jsx | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/tabviews/tableshare/fileupload/index.jsx b/src/tabviews/tableshare/fileupload/index.jsx index cd57610..e9c02bd 100644 --- a/src/tabviews/tableshare/fileupload/index.jsx +++ b/src/tabviews/tableshare/fileupload/index.jsx @@ -51,12 +51,10 @@ } } - getExtraData = file => { - const param = new FormData() - param.append('file', file) - param.append('RootPath', 'Content/images/upload/') - - return param + getExtraData = () => { + return { + RootPath: 'Content/images/upload/' + } } shardupload = (file, shardSize, shardCount, i) => { @@ -72,7 +70,6 @@ if (i < shardCount) { i++ Api.getFileUpload(file).then(res => { - console.log(res) if (res) { this.setState({ percent: Math.floor(100 * (i / shardCount)) @@ -96,7 +93,7 @@ beforeUpload = (file, fileList) => { let shardSize = 200 * 1024 * 1024 - console.log(file) + // console.log(file) if (file.size > shardSize) { this.setState({ @@ -121,6 +118,8 @@ fileList: value, action: baseUrl, method: 'post', + multiple: true, + // headers: {'RootPath': 'Content/images/upload/'}, onChange: this.onChange, onRemove: this.onRemove, data: this.getExtraData, @@ -129,7 +128,7 @@ return ( <Upload {...props}> <Button> - <Icon type="upload" /> Click to Upload + <Icon type="upload" /> 鐐瑰嚮涓婁紶 </Button> {showprogress ? <Progress percent={percent} size="small" /> : null} </Upload> -- Gitblit v1.8.0