Refactor R2 key prefix for deterministic identifiers

This commit is contained in:
thePR0M3TH3AN committed 2026-01-26 12:47:05 -05:00
1 parent 00b0e85438
commit c02db755ac
6 files changed
+42 -12

No files matched your search

+2 -1
View File
@@ -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.");
}