Skip to content

Instantly share code, notes, and snippets.

@mozzius
mozzius / sad-path.ts
Created October 18, 2024 21:00
Bluesky video upload - indirect upload
import { AppBskyEmbedVideo, AtpAgent } from "npm:@atproto/api";
const userAgent = new AtpAgent({
service: prompt("Service URL (default: https://bsky.social):") ||
"https://bsky.social",
});
await userAgent.login({
identifier: prompt("Handle:")!,
password: prompt("Password:")!,
@mozzius
mozzius / happy-path.ts
Created October 18, 2024 20:48
Bluesky video upload - direct upload
import {
AppBskyEmbedVideo,
AppBskyVideoDefs,
AtpAgent,
BlobRef,
} from "npm:@atproto/api";
const userAgent = new AtpAgent({
service: prompt("Service URL (default: https://bsky.social):") ||
"https://bsky.social",