-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
提升文件上传体验 #4393
提升文件上传体验 #4393
Conversation
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
感谢提交,但是缩进处理一下 |
你这个golang格式化程序为什么不是用 |
因为我用goland.. |
改为tab 了 |
* 上传文件支持覆盖被占用的文件且上传失败时不影响原文件,增加强制覆盖选项 * 原文件存在时,保持同样的文件权限 * 制表符更新
What this PR does / why we need it?
如go一类编译后的程序在运行中时,系统无法直接上传同名文件并覆盖,需要先停止go程序进程,才能对占用的文件进行操作,此PR则支持直接覆盖 #2989
Summary of your change
1.上传时先写入到临时文件,上传成功后再覆盖,避免上传失败损坏原来的文件
2.增加overwrite参数,让用户可以选择是否强制覆盖,前端未开发,(当前默认覆盖,与原来行为一致),需要前端上传文件时根据用户选择设置 overwrite字段=1/t/true/false/0/f
3.保持被覆盖的文件权限不变