fix: use a UUIDv7 as filename for images
Fixes problem with caching in bunny.net
This commit is contained in:
parent
36d3a18b08
commit
243c496fda
2 changed files with 2 additions and 2 deletions
|
@ -202,7 +202,7 @@ impl Guild {
|
|||
bunny_storage.delete(relative_url).await?;
|
||||
}
|
||||
|
||||
let path = format!("icons/{}/icon.{}", self.uuid, image_type);
|
||||
let path = format!("icons/{}/{}.{}", self.uuid, Uuid::now_v7(), image_type);
|
||||
|
||||
bunny_storage.upload(path.clone(), icon.into()).await?;
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ impl Me {
|
|||
data.bunny_storage.delete(relative_url).await?;
|
||||
}
|
||||
|
||||
let path = format!("avatar/{}/avatar.{}", self.uuid, image_type);
|
||||
let path = format!("avatar/{}/{}.{}", self.uuid, Uuid::now_v7(), image_type);
|
||||
|
||||
data.bunny_storage
|
||||
.upload(path.clone(), avatar.into())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue