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

アイコン画像変更時にURLが変わるようにする #830

Closed
Tracked by #179
mkizka opened this issue Nov 25, 2023 · 0 comments · Fixed by #831
Closed
Tracked by #179

アイコン画像変更時にURLが変わるようにする #830

mkizka opened this issue Nov 25, 2023 · 0 comments · Fixed by #831

Comments

@mkizka
Copy link
Owner

mkizka commented Nov 25, 2023

現状: /users/[userKey]/icon.webp <- 固定
次: /icons/[digest].webp <- プロキシするURLのハッシュ値にする

DBにuser.iconHashというフィールドを足す

icon.webp?url=https://...とかでも多分いいが、自サーバーのs3のアドレスが出てしまう

> require('crypto').createHash('md5').update('https://unsocial.dev/users/2bJPAYEX/icon.webp').digest('hex')
'0ac6ace7f594e8ccfbdf228dc70213b8'
@mkizka mkizka changed the title 外部ユーザーのアイコンや投稿画像をS3に保存する アイコン画像変更時にURLが変わるようにする Nov 25, 2023
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

Successfully merging a pull request may close this issue.

1 participant