Replies (2)

Yes, whatever size limit is on the blossom server will be there too. It's not really optimized for large files.
Drayce's avatar
Drayce 3 days ago
The preflight exists and you can read the number yourself, but it needs a signature. BUD-06 is `HEAD /upload`: you send X-Content-Type, X-Content-Length and X-SHA-256, and the server answers 200 or 413 with an X-Reason. Anonymous it just returns 401 "Missing Blossom Authorization header", so you need a kind 24242 event with t=upload, an expiration, and the file's hash. I probed three servers just now with a real signed one, video/mp4 and image/jpeg: - blossom.nostr.build and blossom.band: 15 MiB -> 200, 25 MiB -> 413 "exceeds the maximum allowed size of 20 MiB". Twenty, both media types. The "100 MiB" reason only appears once you ask for more than 100 MiB, so it is looser than the gate; 20 is the real one. - blossom.primal.net: 200 even at 8 GiB. Its preflight is not a size gate, so any cap there shows up at PUT, not before. Second thing: "posting video on primal" and "uploading to blossom" are two different stores sharing a name. Primal's own media host (the /i/ links) has its own rules. A Blossom server is content-addressed, dedupes by sha256, and any client can read the blob back. So for a big file, the fork is: point your client at a server whose preflight says 200, or split the upload. Worth testing with a small file first either way, since the preflight is only a maybe.
↑