限制1M
This commit is contained in:
parent
88ef1a966b
commit
56831173ac
|
@ -802,7 +802,7 @@ export default class acclist extends React.Component{
|
||||||
if(my_file.name.indexOf(".xls")||my_file.name.indexOf(".xlsx")||my_file.name.indexOf(".csv"))
|
if(my_file.name.indexOf(".xls")||my_file.name.indexOf(".xlsx")||my_file.name.indexOf(".csv"))
|
||||||
{
|
{
|
||||||
|
|
||||||
if(my_file.size > 5120000)
|
if(my_file.size > 1024000)
|
||||||
{
|
{
|
||||||
Notify.error("文件大小不能大于2M")
|
Notify.error("文件大小不能大于2M")
|
||||||
return;
|
return;
|
||||||
|
@ -810,7 +810,6 @@ export default class acclist extends React.Component{
|
||||||
let formdata = new FormData()
|
let formdata = new FormData()
|
||||||
formdata.append("file",my_file)
|
formdata.append("file",my_file)
|
||||||
formdata.append("path","white_list_excel")
|
formdata.append("path","white_list_excel")
|
||||||
console.log("上传文件",formdata)
|
|
||||||
this.setState({file_loading:true})
|
this.setState({file_loading:true})
|
||||||
uploadImg(formdata).then((res)=>{
|
uploadImg(formdata).then((res)=>{
|
||||||
handelResponse(res,(req,msg)=>{
|
handelResponse(res,(req,msg)=>{
|
||||||
|
|
|
@ -659,7 +659,7 @@ export default class acclist extends React.Component{
|
||||||
|
|
||||||
if(my_file.name.indexOf(".xls")||my_file.name.indexOf(".xlsx")||my_file.name.indexOf(".csv"))
|
if(my_file.name.indexOf(".xls")||my_file.name.indexOf(".xlsx")||my_file.name.indexOf(".csv"))
|
||||||
{
|
{
|
||||||
if(my_file.size > 5120000)
|
if(my_file.size > 1024000)
|
||||||
{
|
{
|
||||||
Notify.error("文件大小不能大于2M")
|
Notify.error("文件大小不能大于2M")
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue