mirror of
https://github.com/halo-dev/plugin-s3.git
synced 2026-01-14 07:03:32 +08:00
Fixes https://github.com/halo-dev/halo/issues/2945 ```release-note Add file check with the same name when uploading ``` 我这里使用了ConcurrentHashMap避免**同时**上传两个同名文件导致文件覆盖问题,在本地存储策略中是由操作系统保证的 不知道这样是不是一个好方法 S3AsyncClient中没有`doesObjectExist`类似的方法,官方的文档也让用`headObject`捕获异常的办法来判断文件是否存在,详见https://github.com/aws/aws-sdk-java-v2/blob/master/docs/LaunchChangelog.md 中搜索`doesObjectExist`