Skip to content
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

Merged
merged 3 commits into from
Apr 3, 2024
Merged

Conversation

qwenode
Copy link
Contributor

@qwenode qwenode commented Apr 2, 2024

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.保持被覆盖的文件权限不变

Copy link

f2c-ci-robot bot commented Apr 2, 2024

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.

Copy link

f2c-ci-robot bot commented Apr 2, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign wanghe-fit2cloud for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zhengkunwang223
Copy link
Member

感谢提交,但是缩进处理一下

@bddjr
Copy link

bddjr commented Apr 2, 2024

你这个golang格式化程序为什么不是用 \t 缩进

@qwenode
Copy link
Contributor Author

qwenode commented Apr 3, 2024

你这个golang格式化程序为什么不是用 \t 缩进

因为我用goland..

@qwenode
Copy link
Contributor Author

qwenode commented Apr 3, 2024

感谢提交,但是缩进处理一下

改为tab 了

@zhengkunwang223 zhengkunwang223 merged commit e3eebc9 into 1Panel-dev:dev Apr 3, 2024
0 of 3 checks passed
KaySar12 pushed a commit to KaySar12/1Panel that referenced this pull request Oct 17, 2024
* 上传文件支持覆盖被占用的文件且上传失败时不影响原文件,增加强制覆盖选项

* 原文件存在时,保持同样的文件权限

* 制表符更新
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants