From c5e8c7f9f17aed57853d6bf732754baff416e2df Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Thu, 9 Jul 2026 16:31:34 -0400 Subject: [PATCH] =?UTF-8?q?feat(storage):=20Blossom=20Phase=201b=20?= =?UTF-8?q?=E2=80=94=20keyless=20multi-server=20config=20UI=20[LOCAL,=20fl?= =?UTF-8?q?ag=20ON]=20(#30)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 /. 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 --- components/profile-modal.html | 18 ++ config/instance-config.js | 5 +- js/ui/components/mediaUploader.js | 16 ++ .../profileModal/ProfileStorageController.js | 154 +++++++++++++++++- tests/blossom-service.test.mjs | 5 +- 5 files changed, 194 insertions(+), 4 deletions(-) diff --git a/components/profile-modal.html b/components/profile-modal.html index 4a430a12..f9beec3e 100644 --- a/components/profile-modal.html +++ b/components/profile-modal.html @@ -1012,9 +1012,25 @@ + + + + + +
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). +
+