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

文件名称,可以实现用文件的md5存储吗? #4

Open
ieras opened this issue Dec 4, 2022 · 1 comment
Open

文件名称,可以实现用文件的md5存储吗? #4

ieras opened this issue Dec 4, 2022 · 1 comment

Comments

@ieras
Copy link

ieras commented Dec 4, 2022

虽然前端计算有点耗费用户电脑,但是如果有这个,配合作者设计的 uploads表,可以实现秒传。计算完md5先请求接口看是否存在,如果存在直接返回,不存在则继续走后续上传逻辑。
就算不实现秒传,这样传oss的时候应该也会覆盖原来相同的文件不会产生多余的重复文件到存储里

@ieras ieras changed the title 文件名称,可以实现用文件的md5寸处吗? 文件名称,可以实现用文件的md5存储吗? Dec 4, 2022
@weiwait
Copy link
Owner

weiwait commented Dec 5, 2022

这个会存在多引用问题,一般来说重复现象不严重,我后续加个开关去自主决定是否保存唯一吧,不过加这个还不如媒体选择

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants