mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
Refactor R2 key prefix for deterministic identifiers
This commit is contained in:
1 parent
00b0e85438
commit
c02db755ac
6 files changed
+42
-12
No files matched your search
@@ -356,7 +356,8 @@ export async function uploadAttachment({
|
||||
}
|
||||
|
||||
const prepared = await prepareAttachmentUpload({ file, encrypt });
|
||||
const key = typeof buildKey === "function" ? buildKey(pubkey, file) : "";
|
||||
const key =
|
||||
typeof buildKey === "function" ? buildKey(pubkey, file, prepared.sha256) : "";
|
||||
if (!key) {
|
||||
throw new Error("Unable to derive storage key for attachment.");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user