You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MSC3911: Deduplication - save file with sha256 path (#155)
# Linked Media MSC3911 AP?: Deduplication- file path with sha256
[#3465](famedly/product-management#3465)
Fixes: #3465
Currently we are storing the file based on `media_id`. With msc3911
introduced, there are many copy actions and that creates duplicated
media. So now we try to save file with sha256 path and avoid
duplication.
There is a feature flag introduce with `use_sha256_paths`. But even with
feature flag is on, we still want to the existing media_id path logic
function well, and backward compatible. Feature flag also prevents the
existing tests failure.
Previously files were saved like this:
```
media/local_content/Ab/cD/...
media/local_thumbnails/Ab/cD/.../32-32-image-png-crop
media/remote_content/{server_name}/Ab/cD/...
```
But with `use_sha256_paths` enabled, media storage structure would be
like this:
```
media/eb/f4/...
thumbnails/eb/f4/.../32-32-image-png-crop
```
0 commit comments