mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
feat(storage): Blossom Phase 1b — keyless multi-server config UI [LOCAL, flag ON] (#30)
Makes Blossom configurable + uploadable end-to-end (local testing).
- Storage pane: a "Blossom (Nostr-native)" provider option (revealed only when the
flag is on) that swaps the S3 field group (#storageS3Fields) for a keyless
#storageBlossomSection — a multi-server textarea (one URL per line). No
access-key/secret/bucket/CORS.
- ProfileStorageController: parseBlossomServers(); save branch persists the server
list in the PLAINTEXT connection meta ({servers}, no encrypted secret) via the
per-provider slot; provider-change loads servers from meta WITHOUT an unlock;
Test does a best-effort reachability ping; visibility branch hides S3 fields +
CORS helper for Blossom.
- mediaUploader.resolveActiveConnection: Blossom connections resolve from plaintext
meta with no unlock (uploads authorize via the Nostr signer, not a stored key),
so credentials = { provider, servers, meta } flow straight into the Phase-1a
engine.
- instance-config: FEATURE_BLOSSOM_STORAGE = true for LOCAL testing (reset to false
before pushing).
Tests: blossom-service 7/7 (isAvailable now flag-relative). Lint + build clean.
Blossom UI present in dist.
VERIFY locally: Storage → Provider → Blossom → add a server → Save → upload a
video → it plays from <server>/<sha256>. Watch the UploadModal's own storage
gating (may need a tweak for the no-secret/no-PIN Blossom case).
Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
0eafd38ec4
commit
c5e8c7f9f1
5 files changed
+194
-4
No files matched your search
@@ -1012,9 +1012,25 @@
|
||||
<option value="cloudflare_r2" selected>Cloudflare R2</option>
|
||||
<option value="backblaze_b2">Backblaze B2</option>
|
||||
<option value="generic_s3">Custom S3</option>
|
||||
<option id="storageProviderBlossomOption" value="blossom" class="hidden">Blossom (Nostr-native)</option>
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<!-- Blossom (Nostr-native) — keyless, multi-server. Shown when the
|
||||
Blossom provider is selected; auth is your Nostr signer. -->
|
||||
<div id="storageBlossomSection" class="hidden space-y-3">
|
||||
<div class="card border border-info/30 bg-info/10 p-3 text-xs text-info">
|
||||
Blossom stores files on nostr-native blob servers. No access keys — uploads are authorized by your Nostr signer. Add one or more servers (uploads mirror to all for resilience). The first server is the primary.
|
||||
</div>
|
||||
<label class="block text-sm text-muted-strong" for="storageBlossomServers">
|
||||
<span class="mb-2 block font-medium">Blossom servers (one URL per line)</span>
|
||||
<textarea id="storageBlossomServers" rows="3" class="input" placeholder="https://blossom.example.com
|
||||
https://another.blossom.example"></textarea>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- S3-family fields (R2 / B2 / Custom S3). Hidden for Blossom. -->
|
||||
<div id="storageS3Fields" class="space-y-4">
|
||||
<!-- R2 Helper -->
|
||||
<div id="storageR2Helper" class="card border border-info/30 bg-info/10 p-3 text-xs text-info">
|
||||
Enter your Cloudflare R2 credentials. Your Account ID (from dashboard) is used to connect. For Public Access URL, use your custom domain or R2.dev subdomain. Ensure the token has "Object Read & Write" permissions.
|
||||
@@ -1068,6 +1084,8 @@
|
||||
The public URL where your files will be accessible (CDN).
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<!-- /storageS3Fields -->
|
||||
|
||||
<label class="flex items-center gap-2 text-sm text-muted-strong">
|
||||
<input id="storageDefault" type="checkbox" class="checkbox" />
|
||||
|
||||
Reference in new issue
Block a user