New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload上传excel文件出错 #8116
Comments
It will be better to write your issue/comment in English, so more people can understand you. |
Your link is not working. |
@yesmeck 这里面,uploadParams因为是临时的,所以我不好贴出来,主要问题出在onChange方法里面,我按照官网的例子,加了进去,第一次上传,一直是uploading,uploading,error,第二次就可以成功了 |
那最起码你要提供具体的错误信息。 |
status拿到的就是error,他POST到我当前页面里面了,然后就是request.js:96 POST http://localhost:8099/addInsurance 500 (),报500错误 |
那是你服务端的错误,检查下请求和服务端的日志吧。 |
@yesmeck 我是上传到阿里云oss,如果是你说的那样,第二次也不会成功 |
oss 出错会返回错误信息的,自己查下吧。 |
Hello @sunhoudong, we use GitHub issues to trace bugs or discuss plans of Ant Design. So, please don't ask usage questions here. You can try to ask questions on Stack Overflow or Segment Fault, then apply tag |
这个确实是使用Upload的时候才出现的,我上传图片都没问题 |
It will be better if you read smart questions(提问的智慧). We will reopen it if you can provide enough information. |
自己的控件的问题不去找,亦或是官网提供的api说的不明白,这些不去处理,为啥我换了方案,直接用input type=file上传就没问题,在这里纠结这个,有意思吗?我已经按照那个fileList受控方案去做了,上传不了,你们倒是推到oss人家头上,厉害,佩服! |
你要提供有用的信息我才能帮你。 |
onChange方法里面,监听状态,先是uploading,最后面变成error,搞不明白的就是为啥会跑到我当前页面去post,结果就是500了,这时候还没有进行任何后台相关的操作,只是上传,最后获取地址而已,我看了一下,问题就在onChange方法里面,但是不知道是什么问题 |
建议有空阅读下 提问的智慧 和 如何有效地报告 bug。抱怨和发泄情绪并不能帮助到彼此,这也是 http://new-issue.ant.design/ 存在的意义。 |
去这里 http://new-issue.ant.design/ 建个新的 issue 吧,最好给出可重现可运行的 codepen 或者 GitHub repo,方便重现、确认问题和调试。(你楼顶提供的 codepen 都不能运行) |
@sunhoudong 请问楼主解决了吗?能请教下是怎么解决的吗? |
Version
2.11.1
Environment
ant 2.11.1,谷歌浏览器
Reproduction link
https://codepen.io/sunhoudong/pen/wPWoVM
Steps to reproduce
无
What is expected?
可以正常上传
What is actually happening?
监听上传的status,前两次都是uploading,第三次是error
The text was updated successfully, but these errors were encountered: