-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat(server): immich checksum header #9229
Conversation
Deploying immich with Cloudflare Pages
|
7d30637
to
de1694e
Compare
@@ -0,0 +1,5 @@ | |||
export const fromChecksum = (checksum: string): Buffer => { | |||
return Buffer.from(checksum, checksum.length === 28 ? 'base64' : 'hex'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can it be guaranteed that base64 is always 28 characters long? lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps "hash" would be more accurate than "checksum"? I usually think of a checksum as being used for data integrity |
We could also use this for that in the future. |
check for
x-immich-checksum
and dedupe before handling the full file upload