-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
refactor: the naming method of uploaded attachments #1500
Conversation
Please tell us how to test your feature in the description of this PR, thanks. And add |
done. |
I think this PR provides a feature for halo, so I suggest adding this PR into milestone v1.5.x. What do you reckon? |
Agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我发现每一个 FileHandler 都会使用 FileDescriptor 处理,如果在 FileHandler 接口中定义一下类似的行为会不会更好呢?
你是的说在接口中写默认实现还是什么呢 主要是感觉可能后续可能会增加名称策略或者存储路径策略 放到接口中感觉不太好 |
比如我们在 FileHandler 接口中新增一个方法: FileDescriptor getFileDescriptor(); 我们可以默认实现一个 FileDescritor,需要定制的实现类手动实现一个即可。 |
@JohnNiang 好的👍 |
改好了 |
|
已解决 |
This reverts commit b46ff3b
Fix #1499
如何测试:
首先通过
FilePathDescriptor
确定该类所构造的文件路径信息是否正确尝试所有不同的上传方式来确定功能是否受影响
测试上传后的附件信息是否符合预期包括
fileKey
,path
等,并测试对同一存储方式下,上传同名文件后的附件信息是否正确,检查是否有重命名