Experimental browser for the Atmosphere
In the next version of Bun Bun gets first-class support for S3. Upload, download, stream, and presign with 0 dependencies
Dec 29, 2024, 6:00 AM
{ "uri": "at://did:plc:76vf7xzncfaxw3m6qemqpmj4/app.bsky.feed.post/3legdozw3nc2p", "cid": "bafyreifi376xoavllonfnlgngsbi7o2rqva5z6pbwte5memoz6i5re7ify", "value": { "text": "In the next version of Bun\n\nBun gets first-class support for S3. Upload, download, stream, and presign with 0 dependencies", "$type": "app.bsky.feed.post", "embed": { "$type": "app.bsky.embed.images", "images": [ { "alt": "import { s3, file, write } from \"bun\";\n\nconst svg = s3(\"logo.svg\", {\n accessKeyId: process.env.S3_ACCESS_KEY,\n secretAccessKey: process.env.S3_SECRET_KEY,\n endpoint: process.env.S3_ENDPOINT,\n bucket: process.env.S3_BUCKET,\n});\n\n// Upload a local file to S3\nawait write(svg, file(\"./logo.svg\"));\n\n// Download from S3 as text \nconst text = await svg.text();\n// or .json(), .bytes(), etc\n\n// Presign a URL\nconst url = svg.presign();\nconsole.log(url);", "image": { "$type": "blob", "ref": { "$link": "bafkreigj7fiugft6jmxwzfifkugbzxhjoaxuaz367rzjoowi3fmw4mn5ra" }, "mimeType": "image/jpeg", "size": 295663 }, "aspectRatio": { "width": 1958, "height": 1999 } } ] }, "langs": [ "en" ], "createdAt": "2024-12-29T06:00:33.671Z" } }