mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-09 22:32:53 +00:00
Compute upload identifiers before building R2 keys
This commit is contained in:
1 parent
8019a27a85
commit
ee31e4318a
3 files changed
+55
-14
No files matched your search
@@ -515,7 +515,12 @@ export class UploadModal {
|
||||
this.updateVideoProgress(0, "Preparing upload...");
|
||||
|
||||
try {
|
||||
// 1. Prepare Upload (Get Creds & Bucket)
|
||||
// 1. Compute Identifier (Info Hash / Fingerprint) before generating keys
|
||||
const identifier = await this.resolveUploadIdentifier(file);
|
||||
|
||||
if (this.videoUploadId !== currentUploadId) return;
|
||||
|
||||
// 2. Prepare Upload (Get Creds & Bucket)
|
||||
const pubkey = this.getCurrentPubkey();
|
||||
const npub = this.safeEncodeNpub(pubkey);
|
||||
const service = this.activeProvider === PROVIDERS.R2 || this.activeProvider === "cloudflare_r2"
|
||||
@@ -526,8 +531,7 @@ export class UploadModal {
|
||||
|
||||
if (this.videoUploadId !== currentUploadId) return;
|
||||
|
||||
// 2. Determine Keys
|
||||
const identifier = await this.resolveUploadIdentifier(file);
|
||||
// 3. Determine Keys
|
||||
const videoKey = buildR2Key(npub, file, identifier);
|
||||
const baseDomain = bucketEntry.publicBaseUrl;
|
||||
|
||||
|
||||
Reference in new issue
Block a user