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

feat: add support for custom template in automatic renaming during upload #115

Merged
merged 15 commits into from
Feb 29, 2024

Conversation

longjuan
Copy link
Member

@longjuan longjuan commented Jan 22, 2024

上传自动重命名支持自定义模板,支持更多占位符

fixes #110
fixes #98

@f2c-ci-robot f2c-ci-robot bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jan 22, 2024
@longjuan
Copy link
Member Author

longjuan commented Jan 22, 2024

/hold
目前有三个问题:

  • 使用日期时间 + 随机字母2023-12-01T09:30:01.123456789-abcdef.png改为2023-12-01T09:30:01-abcdef.png,我删除了后面的纳秒数,这个改动会影响用户,但我觉得纳秒没什么用
  • 上传目录的年月日占位符从原来直接转数字改为两位数文本,2024/1/9->2024/01/09,对用户有影响
  • 策略表单采用了if控制部分选填项的显示,有时候会发生自定义文件名模板随机字母长度错乱(标题变了但内容没变)

image
image

@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 22, 2024
@ruibaby
Copy link
Member

ruibaby commented Feb 3, 2024

策略表单采用了if控制部分选填项的显示,有时候会发生自定义文件名模板和随机字母长度错乱(标题变了但内容没变)

给使用了 if 判断的选项添加 key 应该可以解决此问题,比如:

 - $formkit: number
    name: randomStringLength
+    key: randomStringLength
    label: 随机字母长度
    min: 4
    max: 16

相关 issue:https://github.com/formkit/formkit/issues/1144

@ruibaby
Copy link
Member

ruibaby commented Feb 3, 2024

上传目录的年月日占位符从原来直接转数字改为两位数文本,2024/1/9->2024/01/09,对用户有影响

只要不影响以前上传的文件访问,影响就不大。

@longjuan
Copy link
Member Author

longjuan commented Feb 5, 2024

/unhold
新版本年后再发吧

@longjuan
Copy link
Member Author

longjuan commented Feb 5, 2024

/unhold

@ruibaby
Copy link
Member

ruibaby commented Feb 5, 2024

/unhold

prow is dead

@f2c-ci-robot f2c-ci-robot bot removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Feb 5, 2024
@longjuan
Copy link
Member Author

longjuan commented Feb 5, 2024

长度指定-1有问题
/hold

@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 5, 2024
@longjuan
Copy link
Member Author

longjuan commented Feb 5, 2024

/unhold

@f2c-ci-robot f2c-ci-robot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 5, 2024
@ruibaby ruibaby requested a review from guqing February 20, 2024 07:49
@ruibaby
Copy link
Member

ruibaby commented Feb 20, 2024

cc @halo-dev/sig-halo

README.md Outdated Show resolved Hide resolved
@longjuan
Copy link
Member Author

/cc @halo-dev/sig-halo

@f2c-ci-robot f2c-ci-robot bot requested a review from a team February 29, 2024 12:17
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 29, 2024
Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 29, 2024
Copy link

f2c-ci-robot bot commented Feb 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang, ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@f2c-ci-robot f2c-ci-robot bot merged commit a16bbde into halo-dev:main Feb 29, 2024
4 checks passed
@longjuan longjuan deleted the feat/custom-template branch March 1, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

提供更高自由度的文件自动重命名方式 增加自定义文件名的功能
4 participants