CINXE.COM

S3 Object Storage – API | Bun Docs

<!DOCTYPE html> <html lang="en"> <head><meta charSet="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="theme-color" content="#fbf0df"/><title>S3 Object Storage – API | Bun Docs</title><meta name="description" content="Bun provides fast, native bindings for interacting with S3-compatible object storage services."/><meta name="og:site_name" content="Bun"/><meta name="og:title" content="S3 Object Storage – API | Bun Docs"/><meta name="og:description" content="Bun provides fast, native bindings for interacting with S3-compatible object storage services."/><meta name="og:url" content="https://bun.sh/docs/api/s3"/><meta name="og:image" content="https://bun.sh/og/docs/api/s3.jpg"/><meta name="og:locale" content="en_US"/><meta name="og:type" content="website"/><meta name="twitter:site" content="@oven_sh"/><meta name="twitter:card" content="summary_large_image"/><script type="application/ld+json">{ "@context": "https://schema.org", "@type": "WebSite", "name": "Bun", "alternateName": "Bun", "url": "https://bun.sh" }</script><script type="application/ld+json">{ "@context": "https://schema.org", "@type": "Organization", "name": "Bun", "url": "https://bun.sh", "logo": "https://bun.sh/logo-square.png", "alternateName": "Oven", "sameAs": [ "https://twitter.com/bunjavascript", "https://bun.sh" ], "description": "A fast all-in-one JavaScript runtime and toolkit" }</script><link rel="manifest" href="/manifest.json"/><link rel="alternate" type="text/markdown" href="/docs/api/s3.md"/><link rel="icon" type="image/png" sizes="256x256" href="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAACNuAAAjbgHnu+UfAAAgAElEQVR4nO2dC3wU1dn/n0kgN8EAooCKwaIoVAmoFWpRouLdSlSsilUCtqK+VuNd/60QtV7aqkTsq9K3AlLF+hYlKOBfUCGCXAqVBBEUQRPCLRBJlpBsstndeT/P5EwymZ3LmdvuXM738+GjkL1MZvf5ned2nsPxPA8MBiOYpLHPncEILkwAGIwAwwSAwQgwTAAYjADDBIDBCDBMABiMAMMEgMEIMEwAGIwAwwSAwQgwTAAYjADDBIDBCDBMABiMAMMEgMEIMEwAGIwAwwSAwQgw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m22pAYF7Ek56XYu+r1965+WALEQ2uS5CTndUuSXLzowd31flZBrWUiEOr1/OYLEn4GYrh9NlL/inf9PNwJHqViBZ4UCHIMJt7Tp08EU8sTpN//APNeT+R98sABb+7UogvTHLcutG6pNNpfQBMSfHj9UfrYkpxMul/uNLSLOp0WrdCwATB4hsZ6nc4M9M525hnEm63Bw31tal7rufL2VEp+mcD11VOR47BaTenAr19w7h5pwuu0a98vyCGuO/ytbaUT7FjtYcYgAuqaCQSAcm/O7qYgG2ZsLcgD2Wle7jPlG6EVZuGqpIylNsL8adxEMzpGgAFTLCYfWOfBx1KokLAfsRAwibU1ByGUQKWpQQ6uu9hpyUPZEwD2TZDXo6h9GDdinvcq1HNzQe7b7d3iZzYoIa8awtI0GCr0QCdWoUoA4r2F0Mu0vNikiQMDLyDuBgOA3DxMer1Os/9zrbo390PTLnW7GOzbhrufUYWs2lJ0QPQxAkAbLdtE2YbG46E3R/7aSXgoXhwgkNZx2a+0czoELVePCfZM62KslL0kI8x+RgYYyYAL6xCRrkjO0tVU3VA6TK3vrfv5QmvLy0ohqIAlJF1ElFL6iWuBoBqAE8BJJWS8ALoAJC7On9j3xnAL9flh6V7H5YQAAAAAElFTkSuQmCC"/><script type="text/javascript">globalThis.__setTheme=function(theme){if(theme==="dark"){localStorage.theme="dark";document.documentElement.classList.add("dark")}else{localStorage.theme="light";document.documentElement.classList.remove("dark")}};if(localStorage.theme==="dark"||!("theme"in localStorage)&&window.matchMedia("(prefers-color-scheme: dark)").matches){globalThis.__setTheme("dark")}else{globalThis.__setTheme("light")}</script><script type="text/javascript">document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".DocSearchBox").forEach((el)=>{el.addEventListener("click",()=>{document.querySelector(".DocSearch-Button").click()})})});</script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3"/><style>:root { --black: #0b0a08; /* --gray-50: rgb(249 250 251); --gray-100: rgb(243 244 246); --gray-200: rgb(229 231 235); --gray-300: rgb(209 213 219); --gray-400: rgb(156 163 175); --gray-500: rgb(107 114 128); --gray-600: rgb(75 85 99); --gray-700: rgb(55 65 81); --gray-800: rgb(31 41 55); --gray-900: rgb(17 24 39); */ --gray-950: #0d0e11; --gray-900: #14151a; --gray-800: #282a36; --gray-700: #3b3f4b; --gray-600: #4f5666; --gray-500: #6b7280; --gray-400: #9ca3af; --gray-300: #d1d5db; --gray-200: #e5e7eb; --gray-100: #f3f4f6; --gray-50: #f9fafb; --link-hover-color: #a03939; /* --doc-padding-top: 110px; */ --dark-gray: #282a35; --blue: #00a6e1; --orange: #f89b4b; --orange-light: #d4d3d2; /* --pink: #ee81c3; */ /* --pink-50: #f9e7ed; --pink-100: #f6d2dc; --pink-200: #f3bdc9; --pink-300: #f0a8b6; --pink-400: #ed93a3; --pink-500: #ea7e90; --pink-600: #e7697d; --pink-700: #e4546a; --pink-800: #e13f57; --pink-900: #de2a44; */ /* --pink-50: #fce4ec; --pink-100: #f8bbd0; --pink-200: #f48fb1; --pink-300: #f06292; --pink-400: #ec407a; --pink-500: #e91e63; --pink-600: #d81b60; --pink-700: #c2185b; --pink-800: #ad1457; --pink-900: #880e4f; */ --pink-50: 253, 242, 248; --pink-100: 252, 231, 243; --pink-200: 251, 207, 232; --pink-300: 249, 168, 212; --pink-400: 244, 114, 182; --pink-500: 236, 72, 153; --pink-600: 219, 39, 119; --pink-700: 190, 24, 93; --pink-800: 157, 23, 77; --pink-900: 131, 24, 67; --pink-950: 80, 7, 36; --purple-50: #f3e8f9; --purple-100: #e1d0f2; --purple-200: #cfc8ec; --purple-300: #bdb1e5; --purple-400: #ab99de; --purple-500: #9982d8; --purple-600: #876ad1; --purple-700: #7553cb; --purple-800: #633bc4; --purple-900: #5122bd; --monospace-font: "Fira Code", "Hack", "Source Code Pro", "SF Mono", "Inconsolata", monospace; --dark-border: rgba(200, 200, 25, 0.2); --max-width: 1280px; --system-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; --horizontal-padding: 3rem; --vertical-padding: 4rem; --line-height: 1.4; --phone: 600px; --tablet: 900px; --list-padding: 0.9em; --list-item-padding: 0.375em; --navbar-height: 60px; } * { box-sizing: border-box; } head, body, :root { margin: 0 auto; padding: 0; font-family: var(--system-font); } html { height: 100vh; overflow-y: scroll; overflow-x: hidden; line-height: 1.5; text-size-adjust: 100%; font-family: system-ui, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizelegibility; /* touch-action: manipulation; */ } a { color: inherit; text-decoration: none; } a.expand { transition: transform 0.1s linear; } a.expand:hover { /* text-decoration: underline; */ transform: scale(1.06, 1.06); transform-origin: center; } .mono { font-family: var(--monospace-font) !important; } .Navigation ul { white-space: nowrap; display: flex; gap: 2rem; list-style: none; } .NavText { /* color: #fbf0df; */ display: block; font-weight: 500; font-size: 1.2rem; } #HeaderInstallButton { margin-left: 2.4rem; } #logo { max-width: 70px; margin: auto 0; } #logo-text { max-width: 96px; } /* header { */ /* display: grid; */ /* grid-template-columns: auto max-content; */ /* background-color: var(--black); */ /* padding: 1.5rem 3rem; */ /* align-items: center; */ /* color: white; */ /* } */ #HeaderInstallButton:hover { cursor: pointer; transform: scale(1.06); } #HeaderInstallButton { transition: transform 0.1s linear; background: #00a6e1; padding: 8px 16px; border-radius: 100px; color: black; font-weight: 500; } .BarGraph-subheading { font-size: 0.9rem; color: rgb(135, 134, 134); margin: 0; } .bun-bar { background-color: #f9f1e1; box-shadow: inset 1px 1px 3px #ccc6bb; background-image: url(data:image/svg+xml;base64,PHN2ZyBpZD0iQnVuIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA4MCA3MCI+PHRpdGxlPkJ1biBMb2dvPC90aXRsZT48cGF0aCBpZD0iU2hhZG93IiBkPSJNNzEuMDksMjAuNzRjLS4xNi0uMTctLjMzLS4zNC0uNS0uNXMtLjMzLS4zNC0uNS0uNS0uMzMt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8+PC9nPjxnIGlkPSJGYWNlIj48ZWxsaXBzZSBpZD0iUmlnaHRfQmx1c2giIGRhdGEtbmFtZT0iUmlnaHQgQmx1c2giIGN4PSI1My4yMiIgY3k9IjQwLjE4IiByeD0iNS44NSIgcnk9IjMuNDQiIHN0eWxlPSJmaWxsOiNmZWJiZDAiLz48ZWxsaXBzZSBpZD0iTGVmdF9CbHVjaCIgZGF0YS1uYW1lPSJMZWZ0IEJsdWNoIiBjeD0iMjIuOTUiIGN5PSI0MC4xOCIgcng9IjUuODUiIHJ5PSIzLjQ0IiBzdHlsZT0iZmlsbDojZmViYmQwIi8+PHBhdGggaWQ9IkV5ZXMiIGQ9Ik0yNS43LDM4LjhhNS41MSw1LjUxLDAsMSwwLTUuNS01LjUxQTUuNTEsNS41MSwwLDAsMCwyNS43LDM4LjhabTI0Ljc3LDBBNS41MSw1LjUxLDAsMSwwLDQ1LDMzLjI5LDUuNSw1LjUsMCwwLDAsNTAuNDcsMzguOFoiIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZCIvPjxwYXRoIGlkPSJJcmlzIiBkPSJNMjQsMzMuNjRhMi4wNywyLjA3LDAsMSwwLTIuMDYtMi4wN0EyLjA3LDIuMDcsMCwwLDAsMjQsMzMuNjRabTI0Ljc3LDBhMi4wNywyLjA3LDAsMSwwLTIuMDYtMi4wN0EyLjA3LDIuMDcsMCwwLDAsNDguNzUsMzMuNjRaIiBzdHlsZT0iZmlsbDojZmZmO2ZpbGwtcnVsZTpldmVub2RkIi8+PC9nPjwvc3ZnPg==); background-repeat: no-repeat; background-size: 56px 48.8px; background-position: 19px 46%; } .Tab:hover, .Tab.active { border-bottom-color: var(--gray-400); background-color: var(--gray-800); } .CardContent { position: relative; } .DemphasizedLabel { text-transform: uppercase; white-space: nowrap; } #frameworks { display: flex; } .FrameworksGroup { display: grid; grid-template-rows: auto 40px; gap: 0.5rem; } .DemphasizedLabel { color: #7a7a7a; font-weight: 300; } .FrameworksList { display: grid; grid-template-columns: repeat(2, 40px); gap: 3.5rem; align-items: center; } #cards { display: grid; } .Tag { --background: rgba(31, 31, 132, 0.15); background-color: var(--background); border-radius: 4px; padding: 4px 4px; border: none; line-height: 1; color: black; text-decoration: none !important; display: inline-block; font-family: var(--monospace-font) !important; box-shadow: 0px 1px 0px rgb(111 111 111); } .Tag--Command { --background: #111; font-weight: medium; color: rgb(163, 255, 133); } .Tag--Command:before { content: "❯" / ""; color: rgba(255, 255, 255, 0.35); margin-top: auto; margin-bottom: auto; margin-right: 1ch; margin-left: 0.5ch; display: inline-block; transform: translateY(-1px); } .Tag--WebAPI { --background: #29b6f6; } .Tag--NodeJS { --background: rgb(130, 172, 108); } .Tag--TypeScript { --background: rgb(69, 119, 192); color: white; } .Tag--React { color: rgb(130, 216, 247); --background: #333; } .Tag--React:before { color: rgba(130, 216, 247, 0.5); content: "<" / ""; } .Tag--React:after { color: rgba(130, 216, 247, 0.5); content: ">" / ""; } .Tag--Bun { --background: #e600e5; color: white; } @media (max-width: 1024px) { :root { --max-width: 100%; --horizontal-padding: 16px; --vertical-padding: 2rem; --line-height: 1.6; } main { grid-template-columns: auto; grid-template-rows: auto auto auto; } ul { padding: 0; list-style: none; } #logo-text, #HeaderInstallButton { display: none; } } .Zig { transform: translateY(15%); display: inline; vertical-align: baseline; } .CodeBlock { margin-top: 0px; margin-bottom: 0px; padding: 10px 0px; background-color: var(--gray-800); border-radius: 5px; overflow-x: scroll; -ms-overflow-style: none; /* Internet Explorer 10+ */ scrollbar-width: none; /* Firefox */ } .CodeBlock::-webkit-scrollbar { display: none; /* Safari and Chrome */ } /* Memory leak debug post avoid/prefer styles */ .avoid-example > .CodeBlock { position: relative; } .avoid-example > .CodeBlock::before { content: ""; position: absolute; inset: 0; background-color: rgba(220, 38, 38, 0.08); pointer-events: none; height: 100%; z-index: 1; border: 1px solid rgb(185, 28, 28); border-radius: 0.25rem; } .dark .avoid-example > .CodeBlock::before { background-color: rgba(185, 28, 28, 0.12); } .prefer-example .CodeBlock { position: relative; } .prefer-example > .CodeBlock::before { content: ""; position: absolute; inset: 0; background-color: rgba(22, 163, 74, 0.08); pointer-events: none; height: 100%; z-index: 1; border: 1px solid rgb(22, 163, 74); border-radius: 0.25rem; } .dark .prefer-example > .CodeBlock::before { background-color: rgba(22, 163, 74, 0.12); } .CodeBlock > * { width: fit-content; min-width: 100%; } .CodeBlock .line { height: 15px; white-space: pre; } .CodeBlockShell .shiki code .line:last-child::before { content: "$ " !important; color: white; opacity: 0.5; } .CodeBlockPowershell .shiki code .line:last-child::before { content: "> " !important; color: white; opacity: 0.5; } .CodeBlockResults .shiki * { opacity: 0.8; } .CodeBlockDiff .shiki code .line::before { content: " " !important; opacity: 0.5; } .CodeBlock > div { /* border-bottom: 1px solid #525567; */ overflow: hidden; } .CodeBlock > div:first-child { border-top-left-radius: 5px; border-top-right-radius: 5px; } .CodeBlock > div:last-child { border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-bottom: none; } .CodeBlock .shiki { /* line-height: 20px; !important; */ line-height: 20px; padding: 3px 2.5rem 3px 1rem; border-radius: 0px; font-family: var(--monospace-font); margin-top: 0px; margin-bottom: 0px; } .CodeBlock .CopyIcon { top: -1px; } .CodeBlock + .CodeBlock { margin-top: 15px; } .CodeBlock code { font-size: inherit; } @media (max-width: 640px) { /* .CodeBlock code { */ /* font-size: 0.8em; */ /* } */ } @media (max-width: 768px) { .CodeBlock > div { border-radius: 0px !important; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; } } .CodeTabs .CodeBlock { border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; } .CodeTabs .CodeBlock > div { border-radius: 0px !important; } .CodeTabs { border-radius: 5px; overflow: hidden; } .CodeTabs .CodeBlockTab { display: none; } /* .CodeTabsHeader { */ /* display: flex; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; font-size: 13px; padding: 0px 0rem; border-bottom: 1px solid transparent; background-color: var(--gray-800); border-top-left-radius: 5px; border-top-right-radius: 5px; color: #ffffff80; border-bottom: 1px solid #525567; */ /* } */ /* .CodeTab { */ /* cursor: pointer; */ /* text-align: center; padding: 6px 1rem; font-weight: 400; border-right: 1px solid #525567; */ /* } */ .CodeTab:hover { color: white; } .CodeTab.active { color: white; } .CodeBlockTab { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; font-size: 12px; padding: 0px 1rem 5px 1rem; margin-top: -6px; margin-bottom: 8px; border-bottom: 1px solid transparent; background-color: var(--gray-800); border-top-left-radius: 5px; border-top-right-radius: 5px; color: #ffffff80; border-bottom: 1px solid #525567; } .CodeBlockTab p { margin: 0; padding-top: 5px; padding-bottom: 5px; line-height: 18px; padding-right: 12px; } .CodeTabItem { display: none; } .CodeTabItem.active { display: block; } /* .CodeBlock:nth-child(even) .shiki { background-color: #2e3142 !important; } */ .PlusLine::before, .MinusLine::before { color: #ffffff; opacity: 0.5; left: 8px; top: -6px; position: relative; font-size: 13px; } .PlusLine::before { content: "+"; } .MinusLine::before { content: "-"; /* left: 7px; */ } .Identifier { font-family: var(--monospace-font); font-size: 1rem; color: #50fa7b !important; background-color: var(--gray-800); padding: 0.25rem; border-radius: 4px; text-decoration: none !important; } .PerformanceClaim { text-decoration: dashed underline 2px #000 !important; text-decoration-skip-ink: auto !important; text-underline-offset: 0.3rem !important; } .BarGraph.active { display: block !important; } @media (max-width: 767px) { .sm-full { margin: 0 calc(-1 * var(--horizontal-padding)); width: calc(100vw); border-radius: 0px; } } @media (max-width: 767px) { article > .CodeBlock, .Guide .CodeBlock { margin: 0 calc(-1 * var(--horizontal-padding)); width: calc( 100vw - var(--horizontal-padding) - var(--horizontal-padding) -2px ); border-radius: 0px; } .TableWrapper { margin: 0 calc(-1 * var(--horizontal-padding)); padding: 0px var(--horizontal-padding); width: calc( 100vw - var(--horizontal-padding) - var(--horizontal-padding) -2px ); border-radius: 0px; overflow-x: scroll; -ms-overflow-style: none; /* Internet Explorer 10+ */ scrollbar-width: none; /* Firefox */ } .TableWrapper::-webkit-scrollbar { display: none; /* Safari and Chrome */ } .CodeTabs { margin: 0 calc(-1 * var(--horizontal-padding)); width: calc( 100vw - var(--horizontal-padding) - var(--horizontal-padding) -2px ); border-radius: 0px; } .CodeTabs .CodeBlock { border-radius: 0px; } .CodeTabsHeader { border-top-left-radius: 0px; border-top-right-radius: 0px; overflow-x: auto; } .CodeBlock .shiki { /* padding: 24px 16px; */ white-space: pre-wrap; box-sizing: border-box; font-size: 0.9rem; } header { grid-template-columns: min-content auto; gap: 2rem; } main { padding-left: 0; padding-right: 0; text-align: left; } .Tag--Command { display: block; width: fit-content; margin-bottom: 1rem; } } .Tag--Command { display: block; width: fit-content; margin-bottom: 0.5rem; padding: 8px 12px; } img { object-fit: contain; } .visually-hidden { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } .prose > * { --tw-prose-body: red !important; } /* .prose p { */ /* color: var(--gray-800); */ /* } */ .prose :where(a):not(:where([class~="not-prose"] *)) { font-weight: unset !important; } .prose hr { margin-top: 2em; margin-bottom: 2em; } .prose code { background-color: var(--gray-200); border: 1px solid var(--gray-300); padding: 2px 3px; border-radius: 0.2em; font-weight: unset !important; } .dark .prose code { background-color: var(--gray-700); border: 1px solid var(--gray-700); } .prose pre { overflow-x: hidden !important; } .prose pre code, .dark .prose pre code { background-color: unset; padding: unset; border-radius: unset; font-weight: unset; border: unset; } .prose > img { border-radius: 5px; margin: auto; } @media (max-width: 768px) { .prose > img { margin-left: calc(-1 * var(--horizontal-padding)); border-radius: 0px; max-width: none; width: 100vw; } .prose li figure { width: 100vw !important; margin-left: calc( -1 * (var(--horizontal-padding) + var(--list-item-padding) + var(--list-padding)) ) !important; } .prose > p > img { border-radius: 0px; } .prose .details { margin-left: calc(-1 * var(--horizontal-padding)); border-radius: 0px; max-width: none; width: 100vw; } } .prose li > * { margin-top: 2px !important; margin-bottom: 2px !important; } .prose li p { padding-bottom: 8px; line-height: 1.5; } .prose li > *:last-child { margin-bottom: 1em; } /* .prose figure { width: 100%; margin: auto; } */ .prose figure img { margin-top: 0px !important; margin-bottom: 0px !important; margin-left: auto; margin-right: auto; } .prose li img, .prose li figure { margin: unset; margin-top: 1em; } .prose details { margin-top: 1.25em; margin-bottom: 1.25em; border-left: 1px solid var(--gray-300); padding-left: 15px; } .prose summary::marker { display: none; } .prose :where(code):not(:where([class~="not-prose"] *)):before, .prose :where(code):not(:where([class~="not-prose"] *)):after { content: unset !important; } .prose :where(ul):not(:where([class~="not-prose"] *)) { list-style-type: square !important; padding-left: var(--list-padding) !important; } .prose :where(ul > li):not(:where([class~="not-prose"] *)) { padding-left: var(--list-item-padding) !important; } #blog-post .prose h1 { padding-bottom: 6px; border-bottom: 1px solid #00000018; } #blog-post .prose h2 { padding-bottom: 3px; border-bottom: 1px solid #00000018; } .prose :where(ol):not(:where([class~="not-prose"] *)) { padding-left: 1.22em !important; } .prose :where(ol > li):not(:where([class~="not-prose"] *)) { padding-left: var(--list-item-padding) !important; } .prose :where(blockquote):not(:where([class~="not-prose"] *)) { border-left: 1px solid var(--gray-200); font-weight: normal; } .prose a:hover { transform: none; color: var(--link-hover-color); } .dark .prose a { color: inherit; } .dark .prose a:hover { color: inherit; } .expand-on-hover > * { transition: transform 0.1s linear; } .expand-on-hover:hover > * { transform: scale(1.06, 1.06); transform-origin: center; } .prose .anchored:hover a { transform: none; color: inherit; } .prose h1 { border-bottom: 1px solid var(--gray-200); padding-bottom: 8px; } .prose h2 { border-bottom: 1px solid var(--gray-200); padding-bottom: 4px; } .dark .prose h1, .dark .prose h2 { border-color: var(--gray-700); color: var(--gray-200); } .prose h5, .prose h6 { font-weight: bold; } /* .prose img { border-radius: 5px; } */ @media (max-width: 640px) { .prose > img { height: auto; width: 100vw; } } @media (min-width: 640px) { .prose img { border-radius: 5px; } } .callout > *:first-child { margin-top: 0; } .callout > *:last-child { margin-bottom: 0; } .callout > figure { margin-top: 1.25rem; } .anchored:hover a:last-child::after { content: "#"; opacity: 0.3; margin-left: 0.25em; font-weight: normal; cursor: pointer; /* position: "absolute"; */ } .rawhtml > * { margin: auto; } /* #doc-menu code { background-color: var(--gray-100); border: 1px solid var(--gray-300); padding: 1px 3px; border-radius: 0.2em; font-weight: unset !important; } */ .BlogCard:first-child .BlogCardContents { border-top-color: transparent; } .BlogCard:hover .BlogCardContents { border-top-color: transparent; } .BlogCard:hover + .BlogCard .BlogCardContents { border-top-color: transparent; } .Params { margin: 0; } .Params:nth-child(even) .ParamsName, .Params:nth-child(even) .ParamsContent, .Params:nth-child(even) .ParamsSpacerLast { background-color: var(--gray-100); } .Params .ParamsContent > *:first-child { margin-top: 0; } .Params .ParamsContent > *:last-child { margin-bottom: 0; } .dark .anchor-menu code { color: var(--gray-400) !important; text-decoration: none; } .readme h1:not(:first-of-type) { padding-top: 70px; } @keyframes loaderbar { 0% { transform: scaleX(0); } 100% { transform: scaleX(1); } } .text-outline { text-shadow: 1px 1px 3px black; } a.link-always-underline { text-decoration: underline; text-decoration-thickness: 0.1rem; } .HorizontalGraphItem-grid { margin-top: 4px; display: grid; grid-template-columns: auto min-content min-content; overflow: hidden; grid-template-rows: 36px; } .HorizontalGraphItem-grid .counter { align-items: center; } /* .Crumb .CodeBlock { height: 0px; overflow: visible; margin-left: 500px; } */ @media (min-width: 1024px) { .crumb-left > p:first-child { margin-top: 8px; } .crumb-right { /* max-width: 600px; */ overflow: auto; } .crumb-left { min-width: 350px; } .crumb-left > h1, .crumb-left > h2, .crumb-left > h3 { margin-top: 0; } .crumb-right > figure { margin-top: 0px; margin-bottom: 0px; } } .chakra-portal { --inkeep-colors-grayDark-600: #282a35 !important; } .inline-icon { margin-top: 0 !important; margin-bottom: 0 !important; display: inline; } @media (max-width: 580px) { /* TODO: figure out how to avoid this */ .mobile-flex-wrap { flex-wrap: wrap; } } </style><link rel="canonical" href="https://bun.sh/docs/api/s3"/><style>*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"\201C""\201D""\2018""\2019";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows)/10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows)/10%);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-inline-start:1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-kbd:#111827;--tw-prose-kbd-shadows:17 24 39;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:255 255 255;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:rgba(0,0,0,.5);--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.bottom-\[calc\(100\%\+8px\)\]{bottom:calc(100% + 8px)}.left-0{left:0}.left-1\/2{left:50%}.right-4{right:1rem}.right-\[6px\]{right:6px}.top-0{top:0}.top-24{top:6rem}.top-\[-22px\]{top:-22px}.top-\[-2px\]{top:-2px}.top-\[-80px\]{top:-80px}.top-\[10px\]{top:10px}.top-\[var\(--navbar-height\)\]{top:var(--navbar-height)}.top-full{top:100%}.z-10{z-index:10}.z-\[1\]{z-index:1}.z-\[2\]{z-index:2}.z-\[9999\]{z-index:9999}.col-span-1{grid-column:span 1/span 1}.col-span-full{grid-column:1/-1}.col-start-2{grid-column-start:2}.row-span-full{grid-row:1/-1}.row-start-2{grid-row-start:2}.row-end-\[-1\]{grid-row-end:-1}.-m-1{margin:-.25rem}.-m-2{margin:-.5rem}.m-0{margin:0}.m-\[-2px\]{margin:-2px}.m-\[0\]{margin:0}.m-auto{margin:auto}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-\[18px\]{margin-left:18px;margin-right:18px}.mx-\[calc\(-1\*var\(--horizontal-padding\)\)\]{margin-left:calc(var(--horizontal-padding)*-1);margin-right:calc(var(--horizontal-padding)*-1)}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-top:0;margin-bottom:0}.my-\[1\.25em\]{margin-top:1.25em;margin-bottom:1.25em}.my-\[10px\]{margin-top:10px;margin-bottom:10px}.-mt-\[1px\]{margin-top:-1px}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\[12px\]{margin-bottom:12px}.mb-\[1rem\]{margin-bottom:1rem}.mb-\[2rem\]{margin-bottom:2rem}.mb-\[3px\]{margin-bottom:3px}.mb-\[4px\]{margin-bottom:4px}.mb-\[6px\]{margin-bottom:6px}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-\[-0\.9em\]{margin-left:-.9em}.ml-\[-18px\]{margin-left:-18px}.ml-\[-2px\]{margin-left:-2px}.ml-\[-3px\]{margin-left:-3px}.ml-\[-4px\]{margin-left:-4px}.ml-\[10px\]{margin-left:10px}.ml-\[1px\]{margin-left:1px}.ml-\[6px\]{margin-left:6px}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mr-4{margin-right:1rem}.mr-\[-12px\]{margin-right:-12px}.mr-\[-6px\]{margin-right:-6px}.mr-\[10px\]{margin-right:10px}.mr-\[9px\]{margin-right:9px}.mr-auto{margin-right:auto}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.mt-\[0\.5rem\]{margin-top:.5rem}.mt-\[0\.857em\]{margin-top:.857em}.mt-\[1\.25em\]{margin-top:1.25em}.mt-\[10px\]{margin-top:10px}.mt-\[150px\]{margin-top:150px}.mt-\[1px\]{margin-top:1px}.mt-\[20px\]{margin-top:20px}.mt-\[4px\]{margin-top:4px}.mt-\[80px\]{margin-top:80px}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-0{height:0}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-\[100px\]{height:100px}.h-\[10px\]{height:10px}.h-\[125px\]{height:125px}.h-\[13px\]{height:13px}.h-\[140px\]{height:140px}.h-\[15px\]{height:15px}.h-\[17px\]{height:17px}.h-\[18px\]{height:18px}.h-\[1px\]{height:1px}.h-\[20px\]{height:20px}.h-\[22px\]{height:22px}.h-\[24px\]{height:24px}.h-\[25px\]{height:25px}.h-\[26px\]{height:26px}.h-\[27px\]{height:27px}.h-\[30px\]{height:30px}.h-\[32px\]{height:32px}.h-\[36px\]{height:36px}.h-\[40px\]{height:40px}.h-\[50px\]{height:50px}.h-\[56px\]{height:56px}.h-\[60\.5px\]{height:60.5px}.h-\[60px\]{height:60px}.h-\[62px\]{height:62px}.h-\[63px\]{height:63px}.h-\[80px\]{height:80px}.h-\[85px\]{height:85px}.h-\[calc\(100vh-var\(--navbar-height\)\)\]{height:calc(100vh - var(--navbar-height))}.h-\[calc\(200px\*var\(--level\)\)\]{height:calc(200px*var(--level))}.h-\[var\(--navbar-height\)\]{height:var(--navbar-height)}.h-full{height:100%}.h-min{height:-moz-min-content;height:min-content}.h-screen{height:100vh}.max-h-\[calc\(100vh-10rem\)\]{max-height:calc(100vh - 10rem)}.min-h-\[100vh\]{min-height:100vh}.min-h-\[200px\]{min-height:200px}.min-h-\[70\%\]{min-height:70%}.min-h-\[calc\(100vh-600px\)\]{min-height:calc(100vh - 600px)}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-28{width:7rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-\[100px\]{width:100px}.w-\[10px\]{width:10px}.w-\[120px\]{width:120px}.w-\[15px\]{width:15px}.w-\[16px\]{width:16px}.w-\[17px\]{width:17px}.w-\[180px\]{width:180px}.w-\[18px\]{width:18px}.w-\[200px\]{width:200px}.w-\[20px\]{width:20px}.w-\[21px\]{width:21px}.w-\[22px\]{width:22px}.w-\[24px\]{width:24px}.w-\[250px\]{width:250px}.w-\[25px\]{width:25px}.w-\[26px\]{width:26px}.w-\[300px\]{width:300px}.w-\[30px\]{width:30px}.w-\[35px\]{width:35px}.w-\[4px\]{width:4px}.w-\[50px\]{width:50px}.w-\[8px\]{width:8px}.w-\[var\(--primary\)\]{width:var(--primary)}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-\[12px\]{min-width:12px}.min-w-\[200px\]{min-width:200px}.min-w-\[250px\]{min-width:250px}.min-w-\[300px\]{min-width:300px}.min-w-\[400px\]{min-width:400px}.max-w-4xl{max-width:56rem}.max-w-\[1200px\]{max-width:1200px}.max-w-\[400px\]{max-width:400px}.max-w-\[55px\]{max-width:55px}.max-w-\[600px\]{max-width:600px}.max-w-\[640px\]{max-width:640px}.max-w-\[700px\]{max-width:700px}.max-w-\[750px\]{max-width:750px}.max-w-\[80\%\]{max-width:80%}.max-w-\[800px\]{max-width:800px}.max-w-\[90rem\]{max-width:90rem}.max-w-none{max-width:none}.max-w-screen-lg{max-width:1024px}.max-w-screen-md{max-width:768px}.max-w-screen-sm{max-width:640px}.max-w-screen-xl{max-width:1280px}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-\[10\]{flex:10}.flex-\[1\]{flex:1}.flex-\[2\]{flex:2}.flex-\[3\]{flex:3}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-auto{cursor:auto}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.list-none{list-style-type:none}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.grid-flow-row{grid-auto-flow:row}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-\[auto_1fr_auto\]{grid-template-columns:auto 1fr auto}.grid-cols-\[minmax\(130px\2c _1fr\)_65px_65px_65px\]{grid-template-columns:minmax(130px,1fr) 65px 65px 65px}.grid-cols-\[minmax\(auto\2c var\(--max-width\)\)\]{grid-template-columns:minmax(auto,var(--max-width))}.grid-cols-\[repeat\(3\2c 1fr\)\]{grid-template-columns:repeat(3,1fr)}.grid-cols-\[repeat\(var\(--count\)\2c 1fr\)\]{grid-template-columns:repeat(var(--count),1fr)}.grid-rows-1{grid-template-rows:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-\[0px\]{gap:0}.gap-\[12px\]{gap:12px}.gap-\[13px\]{gap:13px}.gap-\[15px\]{gap:15px}.gap-\[20px\]{gap:20px}.gap-\[25px\]{gap:25px}.gap-\[35px\]{gap:35px}.gap-\[40px\]{gap:40px}.gap-\[5px\]{gap:5px}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-right-width:calc(1px*var(--tw-divide-x-reverse));border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity,1))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-\[0\.2em\]{border-radius:.2em}.rounded-\[2px\]{border-radius:2px}.rounded-\[30px\]{border-radius:30px}.rounded-\[3px\]{border-radius:3px}.rounded-\[4px\]{border-radius:4px}.rounded-\[5px\]{border-radius:5px}.rounded-\[6px\]{border-radius:6px}.rounded-\[8px\]{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-xl{border-radius:.75rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.rounded-tl-none{border-top-left-radius:0}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-\[0px\]{border-width:0}.border-\[2px\]{border-width:2px}.border-x-0{border-left-width:0;border-right-width:0}.border-y-2{border-top-width:2px;border-bottom-width:2px}.\!border-b-0{border-bottom-width:0!important}.border-b,.border-b-\[1px\]{border-bottom-width:1px}.border-b-\[3px\]{border-bottom-width:3px}.border-l,.border-l-\[1px\]{border-left-width:1px}.border-r,.border-r-\[1px\]{border-right-width:1px}.border-t{border-top-width:1px}.border-t-2,.border-t-\[2px\]{border-top-width:2px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[\#00000010\]{border-color:#00000010}.border-\[\#EE81C3\]{--tw-border-opacity:1;border-color:rgb(238 129 195/var(--tw-border-opacity,1))}.border-\[var\(--gray-300\)\]{border-color:var(--gray-300)}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-200\/80{border-color:rgba(229,231,235,.8)}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.border-gray-600{--tw-border-opacity:1;border-color:rgb(79 86 102/var(--tw-border-opacity,1))}.border-gray-700{--tw-border-opacity:1;border-color:rgb(59 63 75/var(--tw-border-opacity,1))}.border-gray-800{--tw-border-opacity:1;border-color:rgb(40 42 54/var(--tw-border-opacity,1))}.border-gray-800\/50{border-color:rgba(40,42,54,.5)}.border-green-500\/30{border-color:rgba(34,197,94,.3)}.border-pink-400{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity,1))}.border-pink-500\/20{border-color:rgba(236,72,153,.2)}.border-transparent{border-color:transparent}.border-b-gray-200{--tw-border-opacity:1;border-bottom-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-b-gray-700{--tw-border-opacity:1;border-bottom-color:rgb(59 63 75/var(--tw-border-opacity,1))}.border-b-gray-800{--tw-border-opacity:1;border-bottom-color:rgb(40 42 54/var(--tw-border-opacity,1))}.border-t-gray-200{--tw-border-opacity:1;border-top-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-t-gray-800{--tw-border-opacity:1;border-top-color:rgb(40 42 54/var(--tw-border-opacity,1))}.bg-\[\#00000010\]{background-color:#00000010}.bg-\[\#00000018\]{background-color:#00000018}.bg-\[\#00000020\]{background-color:#00000020}.bg-\[\#00ff0020\]{background-color:#00ff0020}.bg-\[\#131414\]{--tw-bg-opacity:1;background-color:rgb(19 20 20/var(--tw-bg-opacity,1))}.bg-\[\#1a1a1a\]{--tw-bg-opacity:1;background-color:rgb(26 26 26/var(--tw-bg-opacity,1))}.bg-\[\#EE81C3\]{--tw-bg-opacity:1;background-color:rgb(238 129 195/var(--tw-bg-opacity,1))}.bg-\[\#ff000020\]{background-color:#ff000020}.bg-\[rgb\(249\2c 241\2c 225\)\]{--tw-bg-opacity:1;background-color:rgb(249 241 225/var(--tw-bg-opacity,1))}.bg-\[rgb\(93\2c 89\2c 134\)\]{--tw-bg-opacity:1;background-color:rgb(93 89 134/var(--tw-bg-opacity,1))}.bg-\[rgba\(var\(--pink-400\)\2c 0\.8\)\]{background-color:rgba(var(--pink-400),.8)}.bg-\[var\(--gray-200\)\]{background-color:var(--gray-200)}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-blue-500\/10{background-color:rgba(59,130,246,.1)}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgb(79 86 102/var(--tw-bg-opacity,1))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(59 63 75/var(--tw-bg-opacity,1))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(40 42 54/var(--tw-bg-opacity,1))}.bg-gray-800\/50{background-color:rgba(40,42,54,.5)}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(20 21 26/var(--tw-bg-opacity,1))}.bg-gray-950{--tw-bg-opacity:1;background-color:rgb(13 14 17/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-green-500\/10{background-color:rgba(34,197,94,.1)}.bg-green-500\/20{background-color:rgba(34,197,94,.2)}.bg-pink-100{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.bg-pink-400{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity,1))}.bg-pink-500\/10{background-color:rgba(236,72,153,.1)}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-500\/20{background-color:rgba(239,68,68,.2)}.bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.bg-yellow-500\/20{background-color:rgba(234,179,8,.2)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\[var\(--purple-500\)\]{--tw-gradient-from:var(--purple-500) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-gray-800{--tw-gradient-from:#282a36 var(--tw-gradient-from-position);--tw-gradient-to:rgba(40,42,54,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-pink-200\/50{--tw-gradient-from:rgba(251,207,232,.5) var(--tw-gradient-from-position);--tw-gradient-to:rgba(251,207,232,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-transparent{--tw-gradient-from:transparent var(--tw-gradient-from-position);--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-gray-800{--tw-gradient-to:rgba(40,42,54,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#282a36 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-pink-500\/50{--tw-gradient-to:rgba(236,72,153,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(236,72,153,.5) var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-\[var\(--purple-700\)\]{--tw-gradient-to:var(--purple-700) var(--tw-gradient-to-position)}.to-gray-800{--tw-gradient-to:#282a36 var(--tw-gradient-to-position)}.to-purple-200\/50{--tw-gradient-to:rgba(233,213,255,.5) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.bg-cover{background-size:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-8{padding:2rem}.p-\[0\]{padding:0}.p-\[15px\]{padding:15px}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\[10px\]{padding-left:10px;padding-right:10px}.px-\[12\.5px\]{padding-left:12.5px;padding-right:12.5px}.px-\[12px\]{padding-left:12px;padding-right:12px}.px-\[15px\]{padding-left:15px;padding-right:15px}.px-\[16px\]{padding-left:16px;padding-right:16px}.px-\[17px\]{padding-left:17px;padding-right:17px}.px-\[1rem\]{padding-left:1rem;padding-right:1rem}.px-\[20px\]{padding-left:20px;padding-right:20px}.px-\[25px\]{padding-left:25px;padding-right:25px}.px-\[36px\]{padding-left:36px;padding-right:36px}.px-\[3px\]{padding-left:3px;padding-right:3px}.px-\[4px\]{padding-left:4px;padding-right:4px}.px-\[5px\]{padding-left:5px;padding-right:5px}.px-\[6px\]{padding-left:6px;padding-right:6px}.px-\[7px\]{padding-left:7px;padding-right:7px}.px-\[8px\]{padding-left:8px;padding-right:8px}.px-\[var\(--horizontal-padding\)\]{padding-left:var(--horizontal-padding);padding-right:var(--horizontal-padding)}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-\[100px\]{padding-top:100px;padding-bottom:100px}.py-\[10px\]{padding-top:10px;padding-bottom:10px}.py-\[12px\]{padding-top:12px;padding-bottom:12px}.py-\[13px\]{padding-top:13px;padding-bottom:13px}.py-\[14px\]{padding-top:14px;padding-bottom:14px}.py-\[15px\]{padding-top:15px;padding-bottom:15px}.py-\[16px\]{padding-top:16px;padding-bottom:16px}.py-\[1px\]{padding-top:1px;padding-bottom:1px}.py-\[20px\]{padding-top:20px;padding-bottom:20px}.py-\[24px\]{padding-top:24px;padding-bottom:24px}.py-\[2px\]{padding-top:2px;padding-bottom:2px}.py-\[3px\]{padding-top:3px;padding-bottom:3px}.py-\[4px\]{padding-top:4px;padding-bottom:4px}.py-\[5px\]{padding-top:5px;padding-bottom:5px}.py-\[6px\]{padding-top:6px;padding-bottom:6px}.py-\[70px\]{padding-top:70px;padding-bottom:70px}.py-\[7px\]{padding-top:7px;padding-bottom:7px}.py-\[80px\]{padding-top:80px;padding-bottom:80px}.py-\[8px\]{padding-top:8px;padding-bottom:8px}.\!pb-0{padding-bottom:0!important}.pb-0\.5{padding-bottom:.125rem}.pb-12{padding-bottom:3rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-8{padding-bottom:2rem}.pb-\[1px\]{padding-bottom:1px}.pb-\[25px\]{padding-bottom:25px}.pb-\[4px\]{padding-bottom:4px}.pb-\[50px\]{padding-bottom:50px}.pb-\[5px\]{padding-bottom:5px}.pb-\[5rem\]{padding-bottom:5rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-\[28px\]{padding-left:28px}.pl-\[40px\]{padding-left:40px}.pl-\[52px\]{padding-left:52px}.pl-\[5px\]{padding-left:5px}.pl-\[9px\]{padding-left:9px}.pr-3{padding-right:.75rem}.pr-8{padding-right:2rem}.pr-\[4px\]{padding-right:4px}.pr-\[6px\]{padding-right:6px}.pr-\[9px\]{padding-right:9px}.pt-12{padding-top:3rem}.pt-4{padding-top:1rem}.pt-8{padding-top:2rem}.pt-\[0px\]{padding-top:0}.pt-\[1px\]{padding-top:1px}.pt-\[3px\]{padding-top:3px}.pt-\[45px\]{padding-top:45px}.pt-\[5rem\]{padding-top:5rem}.pt-\[6px\]{padding-top:6px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-start{text-align:start}.align-middle{vertical-align:middle}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-serif{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif}.\!text-\[100\%\]{font-size:100%!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[0\.875em\]{font-size:.875em}.text-\[0\.9em\]{font-size:.9em}.text-\[0\.9rem\]{font-size:.9rem}.text-\[1\.3rem\]{font-size:1.3rem}.text-\[1\.5rem\]{font-size:1.5rem}.text-\[10px\]{font-size:10px}.text-\[130px\]{font-size:130px}.text-\[13pt\]{font-size:13pt}.text-\[13px\]{font-size:13px}.text-\[14pt\]{font-size:14pt}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[1rem\]{font-size:1rem}.text-\[2\.25em\]{font-size:2.25em}.text-\[24pt\]{font-size:24pt}.text-\[28pt\]{font-size:28pt}.text-\[36pt\]{font-size:36pt}.text-\[85\%\]{font-size:85%}.text-\[92\%\]{font-size:92%}.text-\[93\%\]{font-size:93%}.text-\[95\%\]{font-size:95%}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-\[400\]{font-weight:400}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-6{line-height:1.5rem}.leading-\[16px\]{line-height:16px}.leading-\[20px\]{line-height:20px}.leading-\[24px\]{line-height:24px}.leading-\[32px\]{line-height:32px}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.\!text-gray-500{--tw-text-opacity:1!important;color:rgb(107 114 128/var(--tw-text-opacity,1))!important}.text-\[\#111827\]{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-\[\#ffffff80\]{color:#ffffff80}.text-\[var\(--tw-prose-captions\)\]{color:var(--tw-prose-captions)}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-blue-300\/90{color:rgba(147,197,253,.9)}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(79 86 102/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(59 63 75/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(40 42 54/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(20 21 26/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700\/90{color:rgba(21,128,61,.9)}.text-neutral-800\/50{color:rgba(38,38,38,.5)}.text-pink-400{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}.text-pink-600{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}.text-pink-800{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-700\/90{color:rgba(185,28,28,.9)}.text-rose-400{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-white\/90{color:hsla(0,0%,100%,.9)}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.blur{--tw-blur:blur(8px)}.blur,.drop-shadow-\[2px_2px_0px_rgba\(var\(--pink-800\)\)\]{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-\[2px_2px_0px_rgba\(var\(--pink-800\)\)\]{--tw-drop-shadow:drop-shadow(2px 2px 0px rgba(var(--pink-800)))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter-none{filter:none}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.\[-webkit-tap-highlight-color\:transparent\]{-webkit-tap-highlight-color:transparent}.dark\:prose-invert:is(.dark *){--tw-prose-body:var(--tw-prose-invert-body);--tw-prose-headings:var(--tw-prose-invert-headings);--tw-prose-lead:var(--tw-prose-invert-lead);--tw-prose-links:var(--tw-prose-invert-links);--tw-prose-bold:var(--tw-prose-invert-bold);--tw-prose-counters:var(--tw-prose-invert-counters);--tw-prose-bullets:var(--tw-prose-invert-bullets);--tw-prose-hr:var(--tw-prose-invert-hr);--tw-prose-quotes:var(--tw-prose-invert-quotes);--tw-prose-quote-borders:var(--tw-prose-invert-quote-borders);--tw-prose-captions:var(--tw-prose-invert-captions);--tw-prose-kbd:var(--tw-prose-invert-kbd);--tw-prose-kbd-shadows:var(--tw-prose-invert-kbd-shadows);--tw-prose-code:var(--tw-prose-invert-code);--tw-prose-pre-code:var(--tw-prose-invert-pre-code);--tw-prose-pre-bg:var(--tw-prose-invert-pre-bg);--tw-prose-th-borders:var(--tw-prose-invert-th-borders);--tw-prose-td-borders:var(--tw-prose-invert-td-borders)}.first\:pt-0:first-child{padding-top:0}.last\:mb-0:last-child{margin-bottom:0}.last\:border-0:last-child{border-width:0}.visited\:text-pink-900:visited{color:#831843}.hover\:transform-none:hover{transform:none}.hover\:cursor-pointer:hover{cursor:pointer}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.hover\:border-gray-400:hover{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.hover\:border-gray-700:hover{--tw-border-opacity:1;border-color:rgb(59 63 75/var(--tw-border-opacity,1))}.hover\:border-pink-900:hover{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity,1))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(59 63 75/var(--tw-bg-opacity,1))}.hover\:bg-gray-800:hover{--tw-bg-opacity:1;background-color:rgb(40 42 54/var(--tw-bg-opacity,1))}.hover\:bg-gray-800\/20:hover{background-color:rgba(40,42,54,.2)}.hover\:bg-gray-800\/30:hover{background-color:rgba(40,42,54,.3)}.hover\:bg-gray-800\/60:hover{background-color:rgba(40,42,54,.6)}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:text-gray-100:hover{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.hover\:text-gray-300:hover{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(40 42 54/var(--tw-text-opacity,1))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(20 21 26/var(--tw-text-opacity,1))}.hover\:text-pink-900:hover{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:opacity-100:hover{opacity:1}.group:hover .group-hover\:scale-105{--tw-scale-x:1.05;--tw-scale-y:1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.group:hover .group-hover\:bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.group:hover .group-hover\:text-gray-700{--tw-text-opacity:1;color:rgb(59 63 75/var(--tw-text-opacity,1))}.group:hover .group-hover\:underline{text-decoration-line:underline}.group:hover .group-hover\:opacity-100,.group\/tooltip:hover .group-hover\/tooltip\:opacity-100{opacity:1}.group:hover .group-hover\:opacity-30{opacity:.3}.dark\:block:is(.dark *){display:block}.dark\:inline-flex:is(.dark *){display:inline-flex}.dark\:hidden:is(.dark *){display:none}.dark\:divide-gray-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(40 42 54/var(--tw-divide-opacity,1))}.dark\:border:is(.dark *){border-width:1px}.dark\:border-\[0px\]:is(.dark *){border-width:0}.dark\:border-\[\#ffffff18\]:is(.dark *){border-color:#ffffff18}.dark\:border-gray-200:is(.dark *){--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.dark\:border-gray-400:is(.dark *){--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.dark\:border-gray-600:is(.dark *){--tw-border-opacity:1;border-color:rgb(79 86 102/var(--tw-border-opacity,1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity:1;border-color:rgb(59 63 75/var(--tw-border-opacity,1))}.dark\:border-gray-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(40 42 54/var(--tw-border-opacity,1))}.dark\:border-gray-800\/80:is(.dark *){border-color:rgba(40,42,54,.8)}.dark\:border-gray-900:is(.dark *){--tw-border-opacity:1;border-color:rgb(20 21 26/var(--tw-border-opacity,1))}.dark\:border-b-gray-900:is(.dark *){--tw-border-opacity:1;border-bottom-color:rgb(20 21 26/var(--tw-border-opacity,1))}.dark\:border-t-gray-900:is(.dark *){--tw-border-opacity:1;border-top-color:rgb(20 21 26/var(--tw-border-opacity,1))}.dark\:bg-\[\#ffffff10\]:is(.dark *){background-color:#ffffff10}.dark\:bg-\[var\(--gray-700\)\]:is(.dark *){background-color:var(--gray-700)}.dark\:bg-black\/\[0\.96\]:is(.dark *){background-color:rgba(0,0,0,.96)}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(40 42 54/var(--tw-bg-opacity,1))}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(20 21 26/var(--tw-bg-opacity,1))}.dark\:bg-gray-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(13 14 17/var(--tw-bg-opacity,1))}.dark\:bg-green-900\/40:is(.dark *){background-color:rgba(20,83,45,.4)}.dark\:bg-red-900\/40:is(.dark *){background-color:rgba(127,29,29,.4)}.dark\:from-pink-500\/10:is(.dark *){--tw-gradient-from:rgba(236,72,153,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(236,72,153,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.dark\:to-purple-500\/10:is(.dark *){--tw-gradient-to:rgba(168,85,247,.1) var(--tw-gradient-to-position)}.dark\:px-\[12px\]:is(.dark *){padding-left:12px;padding-right:12px}.dark\:py-\[7px\]:is(.dark *){padding-top:7px;padding-bottom:7px}.dark\:text-blue-400:is(.dark *){--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.dark\:text-cyan-400:is(.dark *){--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.dark\:text-gray-50:is(.dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity:1;color:rgb(79 86 102/var(--tw-text-opacity,1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.dark\:text-purple-400:is(.dark *){--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.dark\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\:text-white\/90:is(.dark *){color:hsla(0,0%,100%,.9)}.dark\:opacity-60:is(.dark *){opacity:.6}.dark\:visited\:text-gray-400:visited:is(.dark *){color:#9ca3af}.dark\:hover\:border-gray-400:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.dark\:hover\:border-gray-500:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.dark\:hover\:border-gray-600:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(79 86 102/var(--tw-border-opacity,1))}.hover\:dark\:border-pink-900:is(.dark *):hover{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity,1))}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(40 42 54/var(--tw-bg-opacity,1))}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.dark\:hover\:text-gray-300:hover:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.dark\:hover\:text-gray-400:hover:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.hover\:dark\:text-gray-100:is(.dark *):hover{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.group:hover .dark\:group-hover\:border-gray-600:is(.dark *){--tw-border-opacity:1;border-color:rgb(79 86 102/var(--tw-border-opacity,1))}.group:hover .dark\:group-hover\:bg-gray-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(40 42 54/var(--tw-bg-opacity,1))}.group:hover .dark\:group-hover\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}@media not all and (min-width:768px){.max-md\:-ml-\[7px\]{margin-left:-7px}.max-md\:mb-0{margin-bottom:0}.max-md\:hidden{display:none}.max-md\:h-4{height:1rem}.max-md\:w-4{width:1rem}.max-md\:flex-row{flex-direction:row}.max-md\:gap-2{gap:.5rem}}@media (min-width:640px){.sm\:mx-0{margin-left:0;margin-right:0}.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:h-6{height:1.5rem}.sm\:h-8{height:2rem}.sm\:h-80{height:20rem}.sm\:w-6{width:1.5rem}.sm\:w-\[140px\]{width:140px}.sm\:w-\[60\%\]{width:60%}.sm\:w-\[73\%\]{width:73%}.sm\:w-auto{width:auto}.sm\:w-full{width:100%}.sm\:min-w-0{min-width:0}.sm\:max-w-\[400px\]{max-width:400px}.sm\:max-w-none{max-width:none}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-\[300px_1fr\]{grid-template-columns:300px 1fr}.sm\:grid-cols-\[minmax\(360px\2c _1fr\)_100px_100px_100px\]{grid-template-columns:minmax(360px,1fr) 100px 100px 100px}.sm\:flex-row{flex-direction:row}.sm\:items-start{align-items:flex-start}.sm\:items-baseline{align-items:baseline}.sm\:justify-around{justify-content:space-around}.sm\:gap-4{gap:1rem}.sm\:gap-\[0px\]{gap:0}.sm\:rounded-\[5px\]{border-radius:5px}.sm\:rounded-lg{border-radius:.5rem}.sm\:rounded-t-\[7px\]{border-top-left-radius:7px;border-top-right-radius:7px}.sm\:border{border-width:1px}.sm\:border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:px-\[5px\]{padding-left:5px;padding-right:5px}.sm\:py-\[16px\]{padding-top:16px;padding-bottom:16px}.sm\:text-left{text-align:left}.sm\:text-start{text-align:start}.sm\:text-\[16pt\]{font-size:16pt}.sm\:text-\[30pt\]{font-size:30pt}.sm\:text-base{font-size:1rem;line-height:1.5rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-\[34px\]{line-height:34px}.dark\:sm\:border-gray-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(40 42 54/var(--tw-border-opacity,1))}}@media (min-width:768px){.md\:fixed{position:fixed}.md\:mx-0{margin-left:0;margin-right:0}.md\:my-5{margin-top:1.25rem;margin-bottom:1.25rem}.md\:mb-1{margin-bottom:.25rem}.md\:mb-16{margin-bottom:4rem}.md\:mt-3{margin-top:.75rem}.md\:mt-4{margin-top:1rem}.md\:block{display:block}.md\:inline{display:inline}.md\:flex{display:flex}.md\:table-cell{display:table-cell}.md\:hidden{display:none}.md\:h-20{height:5rem}.md\:h-7{height:1.75rem}.md\:h-\[30px\]{height:30px}.md\:h-\[80px\]{height:80px}.md\:h-auto{height:auto}.md\:max-h-none{max-height:none}.md\:min-h-\[calc\(100vh-85px\)\]{min-height:calc(100vh - 85px)}.md\:w-0{width:0}.md\:w-7{width:1.75rem}.md\:w-\[250px\]{width:250px}.md\:min-w-\[200px\]{min-width:200px}.md\:min-w-\[400px\]{min-width:400px}.md\:max-w-\[80\%\]{max-width:80%}.md\:max-w-\[800px\]{max-width:800px}.md\:max-w-screen-sm{max-width:640px}.md\:basis-1{flex-basis:0.25rem}.md\:columns-2{-moz-columns:2;column-count:2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:flex-wrap{flex-wrap:wrap}.md\:justify-between{justify-content:space-between}.md\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem*var(--tw-space-x-reverse));margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)))}.md\:rounded-\[5px\]{border-radius:5px}.md\:rounded-xl{border-radius:.75rem}.md\:rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.md\:rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.md\:border{border-width:1px}.md\:border-2{border-width:2px}.md\:border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.md\:bg-transparent{background-color:transparent}.md\:p-12{padding:3rem}.md\:p-4{padding:1rem}.md\:px-0{padding-left:0;padding-right:0}.md\:px-16{padding-left:4rem;padding-right:4rem}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-\[var\(--horizontal-padding\)\]{padding-left:var(--horizontal-padding);padding-right:var(--horizontal-padding)}.md\:py-20{padding-top:5rem;padding-bottom:5rem}.md\:py-\[13px\]{padding-top:13px;padding-bottom:13px}.md\:py-\[140px\]{padding-top:140px;padding-bottom:140px}.md\:py-\[40px\]{padding-top:40px;padding-bottom:40px}.md\:pb-\[8rem\]{padding-bottom:8rem}.md\:pt-\[6rem\]{padding-top:6rem}.md\:pt-\[90px\]{padding-top:90px}.md\:text-5xl{font-size:3rem;line-height:1}.md\:text-\[32pt\]{font-size:32pt}.md\:text-base{font-size:1rem;line-height:1.5rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.dark\:md\:border-gray-900:is(.dark *){--tw-border-opacity:1;border-color:rgb(20 21 26/var(--tw-border-opacity,1))}}@media (min-width:1024px){.lg\:block{display:block}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:h-\[40px\]{height:40px}.lg\:w-2\/5{width:40%}.lg\:w-auto{width:auto}.lg\:w-full{width:100%}.lg\:min-w-\[300px\]{min-width:300px}.lg\:max-w-\[1200px\]{max-width:1200px}.lg\:max-w-\[400px\]{max-width:400px}.lg\:max-w-\[700px\]{max-width:700px}.lg\:max-w-\[var\(--max-width\)\]{max-width:var(--max-width)}.lg\:columns-2{-moz-columns:2;column-count:2}.lg\:grid-cols-\[2fr_3fr\]{grid-template-columns:2fr 3fr}.lg\:grid-cols-\[minmax\(auto\2c var\(--max-width\)\)_18rem\]{grid-template-columns:minmax(auto,var(--max-width)) 18rem}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:justify-between{justify-content:space-between}.lg\:gap-\[20px\]{gap:20px}.lg\:gap-\[80px\]{gap:80px}.lg\:rounded-lg{border-radius:.5rem}.lg\:py-32{padding-top:8rem;padding-bottom:8rem}.lg\:py-\[120px\]{padding-top:120px;padding-bottom:120px}.lg\:py-\[16px\]{padding-top:16px;padding-bottom:16px}.lg\:py-\[60px\]{padding-top:60px;padding-bottom:60px}.lg\:text-center{text-align:center}.lg\:text-\[38pt\]{font-size:38pt}}@media (min-width:1280px){.xl\:ml-auto{margin-left:auto}.xl\:h-\[50px\]{height:50px}.xl\:columns-3{-moz-columns:3;column-count:3}.xl\:text-\[40pt\]{font-size:40pt}}.\[\&\.active\]\:border-pink-500.active{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity,1))}.\[\&\.active\]\:text-gray-900.active{--tw-text-opacity:1;color:rgb(20 21 26/var(--tw-text-opacity,1))}.\[\&\.active\]\:text-pink-500.active{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity,1))}.dark\:\[\&\.active\]\:text-gray-200.active:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.\[\&\:\:-webkit-scrollbar-thumb\]\:rounded-full::-webkit-scrollbar-thumb{border-radius:9999px}.\[\&\:\:-webkit-scrollbar-thumb\]\:bg-gray-300::-webkit-scrollbar-thumb{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.hover\:\[\&\:\:-webkit-scrollbar-thumb\]\:bg-gray-400::-webkit-scrollbar-thumb:hover{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.dark\:\[\&\:\:-webkit-scrollbar-thumb\]\:bg-gray-800:is(.dark *)::-webkit-scrollbar-thumb{--tw-bg-opacity:1;background-color:rgb(40 42 54/var(--tw-bg-opacity,1))}.dark\:hover\:\[\&\:\:-webkit-scrollbar-thumb\]\:bg-gray-700:is(.dark *)::-webkit-scrollbar-thumb:hover{--tw-bg-opacity:1;background-color:rgb(59 63 75/var(--tw-bg-opacity,1))}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}.\[\&\:\:-webkit-scrollbar\]\:w-1\.5::-webkit-scrollbar{width:.375rem}.hover\:\[\&\:\:-webkit-scrollbar\]\:block::-webkit-scrollbar:hover{display:block}.\[\&\>\*\]\:m-0>*{margin:0}</style><script defer="" data-domain="bun.sh" src="https://plausible.io/js/script.js"></script><style>:target{scroll-margin-top:10px}@media (min-width:640px){:target{scroll-margin-top:75px}}</style></head><body class="min-h-[100vh] bg-gray-50 dark:bg-gray-900"><div class="grid grid-flow-row grid-cols-1 gap-[15px] md:grid-cols-2" style="display:none"></div><div class="left-0 top-0 z-[1] block h-[60px] w-screen flex-row items-center justify-center border-b-[1px] border-gray-200 bg-gray-50 text-gray-900 dark:border-gray-700 dark:bg-gray-900 md:fixed md:flex" style="height:60px"><header class="w-screen-xl flex h-full w-full flex-row items-center justify-between px-[var(--horizontal-padding)] text-center"><div class="flex flex-row"><div id="doc-page-slider-open" class="inline cursor-pointer dark:bg-gray-900"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="h-10 w-10 rounded-[5px] border border-gray-200 p-1 dark:border-gray-700 dark:text-gray-300 md:hidden"><path fill-rule="evenodd" d="M3 6.75A.75.75 0 0 1 3.75 6h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 6.75ZM3 12a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 12Zm0 5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75Z" clip-rule="evenodd"></path></svg></div><div id="doc-page-slider-menu" class="fixed left-0 top-0 z-10 h-screen w-full select-none overflow-y-scroll bg-gray-50 text-gray-700 dark:bg-gray-900 dark:text-gray-200" style="transform:translate(0px, -110vh);transition-duration:0.3s;transition-timing-function:ease-in-out"><div class="flex h-[var(--navbar-height)] w-full flex-row items-center justify-start border-b border-gray-200 px-[16px] py-[24px] text-lg dark:border-gray-700"><div id="doc-page-slider-close" class="margin-auto cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="h-10 w-10 rounded border border-gray-200 p-1 dark:border-gray-700 "><path fill-rule="evenodd" d="M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd"></path></svg></div></div><div class="h-6"></div><div class="flex w-full flex-row justify-center gap-2 px-6"><a class="block w-full flex-1 rounded-lg border border-gray-300 bg-gray-100 px-2 py-2 text-center text-lg font-medium hover:no-underline dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300" href="/docs">Docs</a><a class="block w-full flex-1 rounded-lg border border-gray-300 bg-gray-100 px-2 py-2 text-center text-lg font-medium hover:no-underline dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300" href="/guides">Guides</a><a class="block w-full flex-1 rounded-lg border border-gray-300 bg-gray-100 px-2 py-2 text-center text-lg font-medium hover:no-underline dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300" href="/blog">Blog</a><a class="block w-full flex-1 rounded-lg border border-gray-300 bg-gray-100 px-2 py-2 text-center text-lg font-medium hover:no-underline dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300" href="https://bun.sh/discord"><div class="flex flex-row items-center justify-center gap-2"><img src="data:image/svg+xml;base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iY3VycmVudENvbG9yIiBjbGFzcz0iYmkgYmktZGlzY29yZCIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBkPSJNMTMuNTQ1IDIuOTA3YTEzLjIyNyAxMy4yMjcgMCAwIDAtMy4yNTctMS4wMTEuMDUuMDUgMCAwIDAtLjA1Mi4wMjVjLS4xNDEuMjUtLjI5Ny41NzctLjQwNi44MzNhMTIuMTkgMTIuMTkgMCAwIDAtMy42NTggMCA4LjI1OCA4LjI1OCAwIDAgMC0uNDEyLS44MzMuMDUxLjA1MSAwIDAgMC0uMDUyLS4wMjVjLTEuMTI1LjE5NC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NTk1LjA1LjA1IDAgMCAxLS4wMi0uMDY2LjA1MS4wNTEgMCAwIDEgLjAxNS0uMDE5Yy4wODQtLjA2My4xNjgtLjEyOS4yNDgtLjE5NWEuMDUuMDUgMCAwIDEgLjA1MS0uMDA3YzIuNjE5IDEuMTk2IDUuNDU0IDEuMTk2IDguMDQxIDBhLjA1Mi4wNTIgMCAwIDEgLjA1My4wMDdjLjA4LjA2Ni4xNjQuMTMyLjI0OC4xOTVhLjA1MS4wNTEgMCAwIDEtLjAwNC4wODUgOC4yNTQgOC4yNTQgMCAwIDEtMS4yNDkuNTk0LjA1LjA1IDAgMCAwLS4wMy4wMy4wNTIuMDUyIDAgMCAwIC4wMDMuMDQxYy4yNC40NjUuNTE1LjkwOS44MTcgMS4zMjlhLjA1LjA1IDAgMCAwIC4wNTYuMDE5IDEzLjIzNSAxMy4yMzUgMCAwIDAgNC4wMDEtMi4wMi4wNDkuMDQ5IDAgMCAwIC4wMjEtLjAzN2MuMzM0LTMuNDUxLS41NTktNi40NDktMi4zNjYtOS4xMDZhLjAzNC4wMzQgMCAwIDAtLjAyLS4wMTlabS04LjE5OCA3LjMwN2MtLjc4OSAwLTEuNDM4LS43MjQtMS40MzgtMS42MTIgMC0uODg5LjYzNy0xLjYxMyAxLjQzOC0xLjYxMy44MDcgMCAxLjQ1LjczIDEuNDM4IDEuNjEzIDAgLjg4OC0uNjM3IDEuNjEyLTEuNDM4IDEuNjEyWm01LjMxNiAwYy0uNzg4IDAtMS40MzgtLjcyNC0xLjQzOC0xLjYxMiAwLS44ODkuNjM3LTEuNjEzIDEuNDM4LTEuNjEzLjgwNyAwIDEuNDUxLjczIDEuNDM4IDEuNjEzIDAgLjg4OC0uNjMxIDEuNjEyLTEuNDM4IDEuNjEyWiIvPgo8L3N2Zz4=" alt="Discord logo" class="mr-2 hidden h-[26px] dark:block"/><div class="text-lg font-medium">Discord</div></div></a><a class="block w-full flex-1 rounded-lg border border-gray-300 bg-gray-100 px-2 py-2 text-center text-lg font-medium hover:no-underline dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300" href="https://github.com/oven-sh/bun"><img src="data:image/svg+xml;base64, PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOEMwIDExLjU0IDIuMjkgMTQuNTMgNS40NyAxNS41OUM1Ljg3IDE1LjY2IDYuMDIgMTUuNDIgNi4wMiAxNS4yMUM2LjAyIDE1LjAyIDYuMDEgMTQuMzkgNi4wMSAxMy43MkM0IDE0LjA5IDMuNDggMTMuMjMgMy4zMiAxMi43OEMzLjIzIDEyLjU1IDIuODQgMTEuODQgMi41IDExLjY1QzIuMjIgMTEuNSAxLjgyIDExLjEzIDIuNDkgMTEuMTJDMy4xMiAxMS4xMSAzLjU3IDExLjcgMy43MiAxMS45NEM0LjQ0IDEzLjE1IDUuNTkgMTIuODEgNi4wNSAxMi42QzYuMTIgMTIuMDggNi4zMyAxMS43MyA2LjU2IDExLjUzQzQuNzggMTEuMzMgMi45MiAxMC42NCAyLjkyIDcuNThDMi45MiA2LjcxIDMuMjMgNS45OSAzLjc0IDUuNDNDMy42NiA1LjIzIDMuMzggNC40MSAzLjgyIDMuMzFDMy44MiAzLjMxIDQuNDkgMy4xIDYuMDIgNC4xM0M2LjY2IDMuOTUgNy4zNCAzLjg2IDguMDIgMy44NkM4LjcgMy44NiA5LjM4IDMuOTUgMTAuMDIgNC4xM0MxMS41NSAzLjA5IDEyLjIyIDMuMzEgMTIuMjIgMy4zMUMxMi42NiA0LjQxIDEyLjM4IDUuMjMgMTIuMyA1LjQzQzEyLjgxIDUuOTkgMTMuMTIgNi43IDEzLjEyIDcuNTh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My42NiA1LjIzIDMuMzggNC40MSAzLjgyIDMuMzFDMy44MiAzLjMxIDQuNDkgMy4xIDYuMDIgNC4xM0M2LjY2IDMuOTUgNy4zNCAzLjg2IDguMDIgMy44NkM4LjcgMy44NiA5LjM4IDMuOTUgMTAuMDIgNC4xM0MxMS41NSAzLjA5IDEyLjIyIDMuMzEgMTIuMjIgMy4zMUMxMi42NiA0LjQxIDEyLjM4IDUuMjMgMTIuMyA1LjQzQzEyLjgxIDUuOTkgMTMuMTIgNi43IDEzLjEyIDcuNThDMTMuMTIgMTAuNjUgMTEuMjUgMTEuMzMgOS40NyAxMS41M0M5Ljc2IDExLjc4IDEwLjAxIDEyLjI2IDEwLjAxIDEzLjAxQzEwLjAxIDE0LjA4IDEwIDE0Ljk0IDEwIDE1LjIxQzEwIDE1LjQyIDEwLjE1IDE1LjY3IDEwLjU1IDE1LjU5QzEzLjcxIDE0LjUzIDE2IDExLjUzIDE2IDhDMTYgMy41OCAxMi40MiAwIDggMFoiIHRyYW5zZm9ybT0ic2NhbGUoNjQpIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K" alt="GitHub logo" class="m-auto hidden h-[24px] dark:block"/></a></div><div class="min-w-[300px] overflow-y-scroll px-8 text-left" style="min-width:300px"><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 text-md" style="font-variant:all-petite-caps">Intro</p><a href="/docs/index" slug="index" id="menu-item-index" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">What is Bun?</p></a><a href="/docs/installation" slug="installation" id="menu-item-installation" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Installation</p></a><a href="/docs/quickstart" slug="quickstart" id="menu-item-quickstart" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Quickstart</p></a><a href="/docs/typescript" slug="typescript" id="menu-item-typescript" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">TypeScript</p></a><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 text-md" style="font-variant:all-petite-caps">Templating</p><a href="/docs/cli/init" slug="cli/init" id="menu-item-cli/init" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun init</code></p></a><a href="/docs/cli/bun-create" slug="cli/bun-create" id="menu-item-cli/bun-create" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun create</code></p></a><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 text-md" style="font-variant:all-petite-caps">Runtime</p><a href="/docs/cli/run" slug="cli/run" id="menu-item-cli/run" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun run</code></p></a><a href="/docs/runtime/loaders" slug="runtime/loaders" id="menu-item-runtime/loaders" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">File types</p></a><a href="/docs/runtime/typescript" slug="runtime/typescript" id="menu-item-runtime/typescript" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">TypeScript</p></a><a href="/docs/runtime/jsx" slug="runtime/jsx" id="menu-item-runtime/jsx" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">JSX</p></a><a href="/docs/runtime/env" slug="runtime/env" id="menu-item-runtime/env" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Environment variables</p></a><a href="/docs/runtime/bun-apis" slug="runtime/bun-apis" id="menu-item-runtime/bun-apis" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Bun APIs</p></a><a href="/docs/runtime/web-apis" slug="runtime/web-apis" id="menu-item-runtime/web-apis" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Web APIs</p></a><a href="/docs/runtime/nodejs-apis" slug="runtime/nodejs-apis" id="menu-item-runtime/nodejs-apis" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Node.js compatibility</p></a><a href="/docs/bundler/executables" slug="bundler/executables" id="menu-item-bundler/executables" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Single-file executable</p></a><a href="/docs/runtime/plugins" slug="runtime/plugins" id="menu-item-runtime/plugins" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Plugins</p></a><a href="/docs/runtime/hot" slug="runtime/hot" id="menu-item-runtime/hot" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Watch mode</p></a><a href="/docs/runtime/modules" slug="runtime/modules" id="menu-item-runtime/modules" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Module resolution</p></a><a href="/docs/runtime/autoimport" slug="runtime/autoimport" id="menu-item-runtime/autoimport" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Auto-install</p></a><a href="/docs/runtime/bunfig" slug="runtime/bunfig" id="menu-item-runtime/bunfig" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">bunfig.toml</p></a><a href="/docs/runtime/debugger" slug="runtime/debugger" id="menu-item-runtime/debugger" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Debugger</p></a><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 !dark:text-gray-600 !hover: cursor-auto !text-gray-500"><span class="opacity-80">Framework API</span><span class="ml-[6px] inline-block rounded-[2px] border border-pink-400 bg-pink-100 px-[4px] pb-[1px] pt-[0px] align-middle text-xs leading-[16px] text-pink-600 opacity-70 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:opacity-60" style="font-variant:all-small-caps">SOON</span></p><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 text-md" style="font-variant:all-petite-caps">Package manager</p><a href="/docs/cli/install" slug="cli/install" id="menu-item-cli/install" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun install</code></p></a><a href="/docs/cli/add" slug="cli/add" id="menu-item-cli/add" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun add</code></p></a><a href="/docs/cli/remove" slug="cli/remove" id="menu-item-cli/remove" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun remove</code></p></a><a href="/docs/cli/update" slug="cli/update" id="menu-item-cli/update" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun update</code></p></a><a href="/docs/cli/publish" slug="cli/publish" id="menu-item-cli/publish" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun publish</code></p></a><a href="/docs/cli/outdated" slug="cli/outdated" id="menu-item-cli/outdated" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun outdated</code></p></a><a href="/docs/cli/link" slug="cli/link" id="menu-item-cli/link" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun link</code></p></a><a href="/docs/cli/pm" slug="cli/pm" id="menu-item-cli/pm" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun pm</code></p></a><a href="/docs/install/cache" slug="install/cache" id="menu-item-install/cache" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Global cache</p></a><a href="/docs/install/workspaces" slug="install/workspaces" id="menu-item-install/workspaces" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Workspaces</p></a><a href="/docs/install/lifecycle" slug="install/lifecycle" id="menu-item-install/lifecycle" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Lifecycle scripts</p></a><a href="/docs/cli/filter" slug="cli/filter" id="menu-item-cli/filter" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Filter</p></a><a href="/docs/install/lockfile" slug="install/lockfile" id="menu-item-install/lockfile" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Lockfile</p></a><a href="/docs/install/registries" slug="install/registries" id="menu-item-install/registries" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Scopes and registries</p></a><a href="/docs/install/overrides" slug="install/overrides" id="menu-item-install/overrides" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Overrides and resolutions</p></a><a href="/docs/install/patch" slug="install/patch" id="menu-item-install/patch" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Patch dependencies</p></a><a href="/docs/install/npmrc" slug="install/npmrc" id="menu-item-install/npmrc" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">.npmrc support</p></a><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 text-md" style="font-variant:all-petite-caps">Bundler</p><a href="/docs/bundler" slug="bundler" id="menu-item-bundler" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">Bun.build</code></p></a><a href="/docs/bundler/html" slug="bundler/html" id="menu-item-bundler/html" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">HTML &amp; static sites</p></a><a href="/docs/bundler/css" slug="bundler/css" id="menu-item-bundler/css" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">CSS</p></a><a href="/docs/bundler/fullstack" slug="bundler/fullstack" id="menu-item-bundler/fullstack" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Fullstack Dev Server</p></a><a href="/docs/bundler/hmr" slug="bundler/hmr" id="menu-item-bundler/hmr" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Hot reloading</p></a><a href="/docs/bundler/loaders" slug="bundler/loaders" id="menu-item-bundler/loaders" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Loaders</p></a><a href="/docs/bundler/plugins" slug="bundler/plugins" id="menu-item-bundler/plugins" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Plugins</p></a><a href="/docs/bundler/macros" slug="bundler/macros" id="menu-item-bundler/macros" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Macros</p></a><a href="/docs/bundler/vs-esbuild" slug="bundler/vs-esbuild" id="menu-item-bundler/vs-esbuild" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">vs esbuild</p></a><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 text-md" style="font-variant:all-petite-caps">Test runner</p><a href="/docs/cli/test" slug="cli/test" id="menu-item-cli/test" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun test</code></p></a><a href="/docs/test/writing" slug="test/writing" id="menu-item-test/writing" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Writing tests</p></a><a href="/docs/test/hot" slug="test/hot" id="menu-item-test/hot" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Watch mode</p></a><a href="/docs/test/lifecycle" slug="test/lifecycle" id="menu-item-test/lifecycle" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Lifecycle hooks</p></a><a href="/docs/test/mocks" slug="test/mocks" id="menu-item-test/mocks" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Mocks</p></a><a href="/docs/test/snapshots" slug="test/snapshots" id="menu-item-test/snapshots" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Snapshots</p></a><a href="/docs/test/time" slug="test/time" id="menu-item-test/time" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Dates and times</p></a><a href="/docs/test/coverage" slug="test/coverage" id="menu-item-test/coverage" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Code coverage</p></a><a href="/docs/test/reporters" slug="test/reporters" id="menu-item-test/reporters" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Test reporters</p></a><a href="/docs/test/configuration" slug="test/configuration" id="menu-item-test/configuration" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Test configuration</p></a><a href="/docs/test/runtime-behavior" slug="test/runtime-behavior" id="menu-item-test/runtime-behavior" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Runtime behavior</p></a><a href="/docs/test/discovery" slug="test/discovery" id="menu-item-test/discovery" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Finding tests</p></a><a href="/docs/test/dom" slug="test/dom" id="menu-item-test/dom" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">DOM testing</p></a><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 text-md" style="font-variant:all-petite-caps">Package runner</p><a href="/docs/cli/bunx" slug="cli/bunx" id="menu-item-cli/bunx" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bunx</code></p></a><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 text-md" style="font-variant:all-petite-caps">API</p><a href="/docs/api/http" slug="api/http" id="menu-item-api/http" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">HTTP server</p></a><a href="/docs/api/fetch" slug="api/fetch" id="menu-item-api/fetch" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">HTTP client</p></a><a href="/docs/api/websockets" slug="api/websockets" id="menu-item-api/websockets" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">WebSockets</p></a><a href="/docs/api/workers" slug="api/workers" id="menu-item-api/workers" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Workers</p></a><a href="/docs/api/binary-data" slug="api/binary-data" id="menu-item-api/binary-data" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Binary data</p></a><a href="/docs/api/streams" slug="api/streams" id="menu-item-api/streams" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Streams</p></a><a href="/docs/api/sql" slug="api/sql" id="menu-item-api/sql" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">SQL</p></a><a href="/docs/api/s3" slug="api/s3" id="menu-item-api/s3" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-700 font-bold dark:border-gray-400 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">S3 Object Storage</p></a><a href="/docs/api/file-io" slug="api/file-io" id="menu-item-api/file-io" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">File I/O</p></a><a href="/docs/api/import-meta" slug="api/import-meta" id="menu-item-api/import-meta" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">import.meta</p></a><a href="/docs/api/sqlite" slug="api/sqlite" id="menu-item-api/sqlite" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">SQLite</p></a><a href="/docs/api/file-system-router" slug="api/file-system-router" id="menu-item-api/file-system-router" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">FileSystemRouter</p></a><a href="/docs/api/tcp" slug="api/tcp" id="menu-item-api/tcp" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">TCP sockets</p></a><a href="/docs/api/udp" slug="api/udp" id="menu-item-api/udp" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">UDP sockets</p></a><a href="/docs/api/globals" slug="api/globals" id="menu-item-api/globals" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Globals</p></a><a href="/docs/runtime/shell" slug="runtime/shell" id="menu-item-runtime/shell" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">$ Shell</p></a><a href="/docs/api/spawn" slug="api/spawn" id="menu-item-api/spawn" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Child processes</p></a><a href="/docs/api/html-rewriter" slug="api/html-rewriter" id="menu-item-api/html-rewriter" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">HTMLRewriter</p></a><a href="/docs/api/hashing" slug="api/hashing" id="menu-item-api/hashing" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Hashing</p></a><a href="/docs/api/console" slug="api/console" id="menu-item-api/console" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Console</p></a><a href="/docs/api/cookie" slug="api/cookie" id="menu-item-api/cookie" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Cookie</p></a><a href="/docs/api/ffi" slug="api/ffi" id="menu-item-api/ffi" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">FFI</p></a><a href="/docs/api/cc" slug="api/cc" id="menu-item-api/cc" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">C Compiler</p></a><a href="/docs/api/test" slug="api/test" id="menu-item-api/test" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Testing</p></a><a href="/docs/api/utils" slug="api/utils" id="menu-item-api/utils" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Utils</p></a><a href="/docs/api/node-api" slug="api/node-api" id="menu-item-api/node-api" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Node-API</p></a><a href="/docs/api/glob" slug="api/glob" id="menu-item-api/glob" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Glob</p></a><a href="/docs/api/dns" slug="api/dns" id="menu-item-api/dns" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">DNS</p></a><a href="/docs/api/semver" slug="api/semver" id="menu-item-api/semver" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Semver</p></a><a href="/docs/api/color" slug="api/color" id="menu-item-api/color" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Color</p></a><a href="/docs/api/transpiler" slug="api/transpiler" id="menu-item-api/transpiler" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Transpiler</p></a><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 text-md" style="font-variant:all-petite-caps">Project</p><a href="/docs/project/roadmap" slug="project/roadmap" id="menu-item-project/roadmap" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Roadmap</p></a><a href="/docs/project/benchmarking" slug="project/benchmarking" id="menu-item-project/benchmarking" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Benchmarking</p></a><a href="/docs/project/contributing" slug="project/contributing" id="menu-item-project/contributing" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Contributing</p></a><a href="/docs/project/building-windows" slug="project/building-windows" id="menu-item-project/building-windows" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Building Windows</p></a><a href="/docs/project/bindgen" slug="project/bindgen" id="menu-item-project/bindgen" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Bindgen</p></a><a href="/docs/project/licensing" slug="project/licensing" id="menu-item-project/licensing" class="no-underline hover:no-underline text-md"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">License</p></a><div class="h-[50px]" style="height:50px"></div></div><script> document.getElementById('doc-page-slider-menu').addEventListener('click', () => { setTimeout(() => { document.getElementById('doc-page-slider-menu').style.transform = 'translate(0px, -110vh)'; }, 50); }) document.getElementById('doc-page-slider-open').addEventListener('click', () => { document.getElementById('doc-page-slider-menu').style.transform = 'translate(0px, 0px)'; }); document.getElementById('doc-page-slider-close').addEventListener('click', () => { document.getElementById('doc-page-slider-menu').style.transform = 'translate(0px, -110vh)'; }); </script></div><div class="w-[16px] md:hidden"></div><a href="/" aria-label="home" class="flex flex-row items-center gap-[12px]"><img src="data:image/svg+xml;base64, PHN2ZyBpZD0iQnVuIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA4MCA3MCI+PHRpdGxlPkJ1biBMb2dvPC90aXRsZT48cGF0aCBpZD0iU2hhZG93IiBkPSJNNzEuMDksMjAuNzRjLS4xNi0uMTctLjMzLS4zNC0uNS0uNXMtLjMzLS4zNC0uNS0uNS0uMzMtLjM0LS41LS41LS4zMy0uMzQtLjUtLjUtLjMzLS4zNC0uNS0uNS0uMzMtLjM0LS41LS41LS4zMy0uMzQtLjUtLjVBMjYuNDYsMjYuNDYsMCwwLDEsNzUuNSwzNS43YzAsMTYuNTctMTYuODIsMzAuMDUtMzcuNSwzMC4wNS0xMS41OCwwLTIxLjk0LTQuMjMtMjguODMtMTAuODZsLjUuNS41LjUuNS41LjUuNS41LjUuNS41LjUuNUMxOS41NSw2NS4zLDMwLjE0LDY5Ljc1LDQyLDY5Ljc1YzIwLjY4LDAsMzcuNS0xMy40OCwzNy41LTMwQzc5LjUs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292taBD9hkkPCzV0EVtHIdeNPll79ztrGk3ugmh0eb6oyeJqPdPwWiFrpinSw1LXheljWJ+1VL+lc0doiFEo+aDKteI+iNdpj502SWzanT7MJhf79IZJ2hnzTDPauLM8QMDDt/zT5z/8LXJq5lHpII6BFj85yjtdexi+fh7iW+JjQHSMrVJ9o8HIC2WUZp80hR2Q9IIFD3zA1jFFLfJ82CHlGKNMUsmVym5WpBvhs6BLp34PlC8H3fIC20Zu4Jht5btO9HjzUrSQfl68Vg5quOYaRc3n+YIrxW5MA+cbVxnpm588Rr2zpIlNNTyV3Pcgo+uZCFF8zLnt65/k4IcZ8rfUA/O3c9kp3U8XM0TtmX3UX6rLN1iyCLsy+pJtYIjlUSlCIsK9Tfquo9lYz2ld1TiYc+pJRqZrwezYl/8BpjOlthQ26tQAAAAASUVORK5CYII=" width="60"/></a></div><div class="w-[35px]"></div><div class="hidden flex-row md:flex"><div class="DocSearchBox text-md flex h-[40px] w-[250px] cursor-pointer flex-row items-center justify-start rounded bg-gray-200 text-gray-500 dark:bg-gray-800 dark:text-gray-400"><div class="w-[8px]"></div><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="mt-[1px] h-[20px] w-[20px] "><path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"></path></svg><div class="w-[4px]"></div><p class="m-0 pt-[1px] text-sm leading-none">Search the docs...</p><p class="flex-1"></p><div class="m-0 flex h-[30px] items-center rounded-[3px] border border-dashed border-gray-400 px-[8px] text-gray-400 dark:border-gray-600"><p class="pb-[1px] font-light leading-none">/</p></div><div class="w-[4px]"></div></div></div><div class="flex-[10]"></div><div class="flex flex-row items-center justify-end md:hidden"><div class="flex flex-row items-center justify-center gap-[13px]"><div class="DocSearchBox inline-flex cursor-pointer select-none"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="h-[25px] w-[25px] text-black dark:text-white"><path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"></path></svg></div><div class="sun m-[-2px] hidden cursor-pointer select-none dark:inline-flex"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="h-[30px] w-[30px] text-black dark:text-white"><path d="M12 2.25a.75.75 0 0 1 .75.75v2.25a.75.75 0 0 1-1.5 0V3a.75.75 0 0 1 .75-.75ZM7.5 12a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM18.894 6.166a.75.75 0 0 0-1.06-1.06l-1.591 1.59a.75.75 0 1 0 1.06 1.061l1.591-1.59ZM21.75 12a.75.75 0 0 1-.75.75h-2.25a.75.75 0 0 1 0-1.5H21a.75.75 0 0 1 .75.75ZM17.834 18.894a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 1 0-1.061 1.06l1.59 1.591ZM12 18a.75.75 0 0 1 .75.75V21a.75.75 0 0 1-1.5 0v-2.25A.75.75 0 0 1 12 18ZM7.758 17.303a.75.75 0 0 0-1.061-1.06l-1.591 1.59a.75.75 0 0 0 1.06 1.061l1.591-1.59ZM6 12a.75.75 0 0 1-.75.75H3a.75.75 0 0 1 0-1.5h2.25A.75.75 0 0 1 6 12ZM6.697 7.757a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 0 0-1.061 1.06l1.59 1.591Z"></path></svg></div><div class="moon m-[-2px] inline-flex cursor-pointer select-none dark:hidden"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="h-[27px] w-[30px] text-black dark:text-white"><path fill-rule="evenodd" d="M9.528 1.718a.75.75 0 0 1 .162.819A8.97 8.97 0 0 0 9 6a9 9 0 0 0 9 9 8.97 8.97 0 0 0 3.463-.69.75.75 0 0 1 .981.98 10.503 10.503 0 0 1-9.694 6.46c-5.799 0-10.5-4.7-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 0 1 .818.162Z" clip-rule="evenodd"></path></svg></div></div></div><nav class="hidden h-full list-none flex-row items-center justify-end gap-6 whitespace-nowrap md:flex"><a class="text-lg font-medium hover:no-underline dark:text-gray-300" href="/docs">Docs</a><a class="text-lg font-medium hover:no-underline dark:text-gray-300" href="/guides">Guides</a><a class="text-lg font-medium hover:no-underline dark:text-gray-300" href="/blog">Blog</a><a class="text-lg font-medium hover:no-underline dark:text-gray-300" href="https://bun.sh/discord"><div class="flex flex-row items-center justify-center gap-2"><img src="data:image/svg+xml;base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iY3VycmVudENvbG9yIiBjbGFzcz0iYmkgYmktZGlzY29yZCIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBkPSJNMTMuNTQ1IDIuOTA3YTEzLjIyNyAxMy4yMjcgMCAwIDAtMy4yNTctMS4wMTEuMDUuMDUgMCAwIDAtLjA1Mi4wMjVjLS4xNDEuMjUtLjI5Ny41NzctLjQwNi44MzNhMTIuMTkgMTIuMTkgMCAwIDAtMy42NTggMCA4LjI1OCA4LjI1OCAwIDAgMC0uNDEyLS44MzMuMDUxLjA1MSAwIDAgMC0uMDUyLS4wMjVjLTEuMTI1LjE5NC0yLjIyLjUzNC0zLjI1NyAxLjAxMWEuMDQxLjA0MSAwIDAgMC0uMDIxLjAxOEMuMzU2IDYuMDI0LS4yMTMgOS4wNDcuMDY2IDEyLjAzMmMuMDAxLjAxNC4wMS4wMjguMDIxLjAzN2ExMy4yNzYgMTMuMjc2IDAgMCAwIDMuOTk1IDIuMDIuMDUuMDUgMCAwIDAgL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gLjA1My4wMDdjLjA4LjA2Ni4xNjQuMTMyLjI0OC4xOTVhLjA1MS4wNTEgMCAwIDEtLjAwNC4wODUgOC4yNTQgOC4yNTQgMCAwIDEtMS4yNDkuNTk0LjA1LjA1IDAgMCAwLS4wMy4wMy4wNTIuMDUyIDAgMCAwIC4wMDMuMDQxYy4yNC40NjUuNTE1LjkwOS44MTcgMS4zMjlhLjA1LjA1IDAgMCAwIC4wNTYuMDE5IDEzLjIzNSAxMy4yMzUgMCAwIDAgNC4wMDEtMi4wMi4wNDkuMDQ5IDAgMCAwIC4wMjEtLjAzN2MuMzM0LTMuNDUxLS41NTktNi40NDktMi4zNjYtOS4xMDZhLjAzNC4wMzQgMCAwIDAtLjAyLS4wMTlabS04LjE5OCA3LjMwN2MtLjc4OSAwLTEuNDM4LS43MjQtMS40MzgtMS42MTIgMC0uODg5LjYzNy0xLjYxMyAxLjQzOC0xLjYxMy44MDcgMCAxLjQ1LjczIDEuNDM4IDEuNjEzIDAgLjg4OC0uNjM3IDEuNjEyLTEuNDM4IDEuNjEyWm01LjMxNiAwYy0uNzg4IDAtMS40MzgtLjcyNC0xLjQzOC0xLjYxMiAwLS44ODkuNjM3LTEuNjEzIDEuNDM4LTEuNjEzLjgwNyAwIDEuNDUxLjczIDEuNDM4IDEuNjEzIDAgLjg4OC0uNjMxIDEuNjEyLTEuNDM4IDEuNjEyWiIvPgo8L3N2Zz4=" alt="Discord logo" class="mr-2 hidden h-[26px] dark:block"/><div class="text-lg font-medium">Discord</div></div></a><a class="text-lg font-medium hover:no-underline dark:text-gray-300" href="https://github.com/oven-sh/bun"><img src="data:image/svg+xml;base64, PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZ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IgNi43IDEzLjEyIDcuNThDMTMuMTIgMTAuNjUgMTEuMjUgMTEuMzMgOS40NyAxMS41M0M5Ljc2IDExLjc4IDEwLjAxIDEyLjI2IDEwLjAxIDEzLjAxQzEwLjAxIDE0LjA4IDEwIDE0Ljk0IDEwIDE1LjIxQzEwIDE1LjQyIDEwLjE1IDE1LjY3IDEwLjU1IDE1LjU5QzEzLjcxIDE0LjUzIDE2IDExLjUzIDE2IDhDMTYgMy41OCAxMi40MiAwIDggMFoiIHRyYW5zZm9ybT0ic2NhbGUoNjQpIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K" alt="GitHub logo" class="m-auto hidden h-[24px] dark:block"/></a><div class="sun m-[-2px] hidden cursor-pointer select-none dark:inline-flex"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="h-[30px] w-[30px] text-black dark:text-white"><path d="M12 2.25a.75.75 0 0 1 .75.75v2.25a.75.75 0 0 1-1.5 0V3a.75.75 0 0 1 .75-.75ZM7.5 12a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM18.894 6.166a.75.75 0 0 0-1.06-1.06l-1.591 1.59a.75.75 0 1 0 1.06 1.061l1.591-1.59ZM21.75 12a.75.75 0 0 1-.75.75h-2.25a.75.75 0 0 1 0-1.5H21a.75.75 0 0 1 .75.75ZM17.834 18.894a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 1 0-1.061 1.06l1.59 1.591ZM12 18a.75.75 0 0 1 .75.75V21a.75.75 0 0 1-1.5 0v-2.25A.75.75 0 0 1 12 18ZM7.758 17.303a.75.75 0 0 0-1.061-1.06l-1.591 1.59a.75.75 0 0 0 1.06 1.061l1.591-1.59ZM6 12a.75.75 0 0 1-.75.75H3a.75.75 0 0 1 0-1.5h2.25A.75.75 0 0 1 6 12ZM6.697 7.757a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 0 0-1.061 1.06l1.59 1.591Z"></path></svg></div><div class="moon m-[-2px] inline-flex cursor-pointer select-none dark:hidden"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="h-[27px] w-[30px] text-black dark:text-white"><path fill-rule="evenodd" d="M9.528 1.718a.75.75 0 0 1 .162.819A8.97 8.97 0 0 0 9 6a9 9 0 0 0 9 9 8.97 8.97 0 0 0 3.463-.69.75.75 0 0 1 .981.98 10.503 10.503 0 0 1-9.694 6.46c-5.799 0-10.5-4.7-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 0 1 .818.162Z" clip-rule="evenodd"></path></svg></div></nav></header></div><div class="hidden" id="docsearchbox"></div><div id="inkeep-chat-button" class="h-0 p-0"></div><section class="mx-auto flex max-w-screen-xl flex-row justify-start px-0 md:px-[var(--horizontal-padding)]"><div class="sticky top-[var(--navbar-height)] hidden h-[calc(100vh-var(--navbar-height))] w-[300px] md:block md:min-w-[200px] lg:min-w-[300px]" style="left:0px;top:0px;height:calc(100vh - 60px)"><div class="h-[var(--navbar-height)]"></div><div id="doc-menu" class="invisible relative h-full w-full overflow-y-scroll border-r-[1px] border-gray-200 pb-[50px] pr-3 dark:border-gray-700"><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 " style="font-variant:all-petite-caps">Intro</p><a href="/docs/index" slug="index" id="menu-item-index" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">What is Bun?</p></a><a href="/docs/installation" slug="installation" id="menu-item-installation" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Installation</p></a><a href="/docs/quickstart" slug="quickstart" id="menu-item-quickstart" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Quickstart</p></a><a href="/docs/typescript" slug="typescript" id="menu-item-typescript" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">TypeScript</p></a><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 " style="font-variant:all-petite-caps">Templating</p><a href="/docs/cli/init" slug="cli/init" id="menu-item-cli/init" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun init</code></p></a><a href="/docs/cli/bun-create" slug="cli/bun-create" id="menu-item-cli/bun-create" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun create</code></p></a><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 " style="font-variant:all-petite-caps">Runtime</p><a href="/docs/cli/run" slug="cli/run" id="menu-item-cli/run" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun run</code></p></a><a href="/docs/runtime/loaders" slug="runtime/loaders" id="menu-item-runtime/loaders" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">File types</p></a><a href="/docs/runtime/typescript" slug="runtime/typescript" id="menu-item-runtime/typescript" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">TypeScript</p></a><a href="/docs/runtime/jsx" slug="runtime/jsx" id="menu-item-runtime/jsx" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">JSX</p></a><a href="/docs/runtime/env" slug="runtime/env" id="menu-item-runtime/env" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Environment variables</p></a><a href="/docs/runtime/bun-apis" slug="runtime/bun-apis" id="menu-item-runtime/bun-apis" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Bun APIs</p></a><a href="/docs/runtime/web-apis" slug="runtime/web-apis" id="menu-item-runtime/web-apis" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Web APIs</p></a><a href="/docs/runtime/nodejs-apis" slug="runtime/nodejs-apis" id="menu-item-runtime/nodejs-apis" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Node.js compatibility</p></a><a href="/docs/bundler/executables" slug="bundler/executables" id="menu-item-bundler/executables" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Single-file executable</p></a><a href="/docs/runtime/plugins" slug="runtime/plugins" id="menu-item-runtime/plugins" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Plugins</p></a><a href="/docs/runtime/hot" slug="runtime/hot" id="menu-item-runtime/hot" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Watch mode</p></a><a href="/docs/runtime/modules" slug="runtime/modules" id="menu-item-runtime/modules" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Module resolution</p></a><a href="/docs/runtime/autoimport" slug="runtime/autoimport" id="menu-item-runtime/autoimport" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Auto-install</p></a><a href="/docs/runtime/bunfig" slug="runtime/bunfig" id="menu-item-runtime/bunfig" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">bunfig.toml</p></a><a href="/docs/runtime/debugger" slug="runtime/debugger" id="menu-item-runtime/debugger" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Debugger</p></a><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 !dark:text-gray-600 !hover: cursor-auto !text-gray-500"><span class="opacity-80">Framework API</span><span class="ml-[6px] inline-block rounded-[2px] border border-pink-400 bg-pink-100 px-[4px] pb-[1px] pt-[0px] align-middle text-xs leading-[16px] text-pink-600 opacity-70 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:opacity-60" style="font-variant:all-small-caps">SOON</span></p><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 " style="font-variant:all-petite-caps">Package manager</p><a href="/docs/cli/install" slug="cli/install" id="menu-item-cli/install" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun install</code></p></a><a href="/docs/cli/add" slug="cli/add" id="menu-item-cli/add" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun add</code></p></a><a href="/docs/cli/remove" slug="cli/remove" id="menu-item-cli/remove" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun remove</code></p></a><a href="/docs/cli/update" slug="cli/update" id="menu-item-cli/update" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun update</code></p></a><a href="/docs/cli/publish" slug="cli/publish" id="menu-item-cli/publish" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun publish</code></p></a><a href="/docs/cli/outdated" slug="cli/outdated" id="menu-item-cli/outdated" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun outdated</code></p></a><a href="/docs/cli/link" slug="cli/link" id="menu-item-cli/link" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun link</code></p></a><a href="/docs/cli/pm" slug="cli/pm" id="menu-item-cli/pm" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun pm</code></p></a><a href="/docs/install/cache" slug="install/cache" id="menu-item-install/cache" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Global cache</p></a><a href="/docs/install/workspaces" slug="install/workspaces" id="menu-item-install/workspaces" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Workspaces</p></a><a href="/docs/install/lifecycle" slug="install/lifecycle" id="menu-item-install/lifecycle" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Lifecycle scripts</p></a><a href="/docs/cli/filter" slug="cli/filter" id="menu-item-cli/filter" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Filter</p></a><a href="/docs/install/lockfile" slug="install/lockfile" id="menu-item-install/lockfile" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Lockfile</p></a><a href="/docs/install/registries" slug="install/registries" id="menu-item-install/registries" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Scopes and registries</p></a><a href="/docs/install/overrides" slug="install/overrides" id="menu-item-install/overrides" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Overrides and resolutions</p></a><a href="/docs/install/patch" slug="install/patch" id="menu-item-install/patch" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Patch dependencies</p></a><a href="/docs/install/npmrc" slug="install/npmrc" id="menu-item-install/npmrc" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">.npmrc support</p></a><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 " style="font-variant:all-petite-caps">Bundler</p><a href="/docs/bundler" slug="bundler" id="menu-item-bundler" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">Bun.build</code></p></a><a href="/docs/bundler/html" slug="bundler/html" id="menu-item-bundler/html" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">HTML &amp; static sites</p></a><a href="/docs/bundler/css" slug="bundler/css" id="menu-item-bundler/css" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">CSS</p></a><a href="/docs/bundler/fullstack" slug="bundler/fullstack" id="menu-item-bundler/fullstack" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Fullstack Dev Server</p></a><a href="/docs/bundler/hmr" slug="bundler/hmr" id="menu-item-bundler/hmr" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Hot reloading</p></a><a href="/docs/bundler/loaders" slug="bundler/loaders" id="menu-item-bundler/loaders" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Loaders</p></a><a href="/docs/bundler/plugins" slug="bundler/plugins" id="menu-item-bundler/plugins" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Plugins</p></a><a href="/docs/bundler/macros" slug="bundler/macros" id="menu-item-bundler/macros" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Macros</p></a><a href="/docs/bundler/vs-esbuild" slug="bundler/vs-esbuild" id="menu-item-bundler/vs-esbuild" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">vs esbuild</p></a><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 " style="font-variant:all-petite-caps">Test runner</p><a href="/docs/cli/test" slug="cli/test" id="menu-item-cli/test" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bun test</code></p></a><a href="/docs/test/writing" slug="test/writing" id="menu-item-test/writing" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Writing tests</p></a><a href="/docs/test/hot" slug="test/hot" id="menu-item-test/hot" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Watch mode</p></a><a href="/docs/test/lifecycle" slug="test/lifecycle" id="menu-item-test/lifecycle" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Lifecycle hooks</p></a><a href="/docs/test/mocks" slug="test/mocks" id="menu-item-test/mocks" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Mocks</p></a><a href="/docs/test/snapshots" slug="test/snapshots" id="menu-item-test/snapshots" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Snapshots</p></a><a href="/docs/test/time" slug="test/time" id="menu-item-test/time" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Dates and times</p></a><a href="/docs/test/coverage" slug="test/coverage" id="menu-item-test/coverage" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Code coverage</p></a><a href="/docs/test/reporters" slug="test/reporters" id="menu-item-test/reporters" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Test reporters</p></a><a href="/docs/test/configuration" slug="test/configuration" id="menu-item-test/configuration" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Test configuration</p></a><a href="/docs/test/runtime-behavior" slug="test/runtime-behavior" id="menu-item-test/runtime-behavior" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Runtime behavior</p></a><a href="/docs/test/discovery" slug="test/discovery" id="menu-item-test/discovery" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Finding tests</p></a><a href="/docs/test/dom" slug="test/dom" id="menu-item-test/dom" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">DOM testing</p></a><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 " style="font-variant:all-petite-caps">Package runner</p><a href="/docs/cli/bunx" slug="cli/bunx" id="menu-item-cli/bunx" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">bunx</code></p></a><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 " style="font-variant:all-petite-caps">API</p><a href="/docs/api/http" slug="api/http" id="menu-item-api/http" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">HTTP server</p></a><a href="/docs/api/fetch" slug="api/fetch" id="menu-item-api/fetch" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">HTTP client</p></a><a href="/docs/api/websockets" slug="api/websockets" id="menu-item-api/websockets" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">WebSockets</p></a><a href="/docs/api/workers" slug="api/workers" id="menu-item-api/workers" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Workers</p></a><a href="/docs/api/binary-data" slug="api/binary-data" id="menu-item-api/binary-data" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Binary data</p></a><a href="/docs/api/streams" slug="api/streams" id="menu-item-api/streams" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Streams</p></a><a href="/docs/api/sql" slug="api/sql" id="menu-item-api/sql" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">SQL</p></a><a href="/docs/api/s3" slug="api/s3" id="menu-item-api/s3" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-700 font-bold dark:border-gray-400 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">S3 Object Storage</p></a><div id="doc-menu-in-page" class="doc-menu-in-page anchor-menu"><a href="#basic-usage" class="no-underline hover:no-underline"><div anchor-id="basic-usage" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[28px]">Basic Usage</div></a><a href="#bun-s3client-bun-s3" class="no-underline hover:no-underline"><div anchor-id="bun-s3client-bun-s3" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">Bun.S3Client</code> &amp; <code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">Bun.s3</code></div></a><a href="#working-with-s3-files" class="no-underline hover:no-underline"><div anchor-id="working-with-s3-files" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Working with S3 Files</div></a><a href="#reading-files-from-s3" class="no-underline hover:no-underline"><div anchor-id="reading-files-from-s3" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Reading files from S3</div></a><a href="#writing-uploading-files-to-s3" class="no-underline hover:no-underline"><div anchor-id="writing-uploading-files-to-s3" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Writing &amp; uploading files to S3</div></a><a href="#working-with-large-files-streams" class="no-underline hover:no-underline"><div anchor-id="working-with-large-files-streams" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Working with large files (streams)</div></a><a href="#presigning-urls" class="no-underline hover:no-underline"><div anchor-id="presigning-urls" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[28px]">Presigning URLs</div></a><a href="#setting-acls" class="no-underline hover:no-underline"><div anchor-id="setting-acls" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Setting ACLs</div></a><a href="#expiring-urls" class="no-underline hover:no-underline"><div anchor-id="expiring-urls" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Expiring URLs</div></a><a href="#method" class="no-underline hover:no-underline"><div anchor-id="method" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">method</code></div></a><a href="#new-response-s3file" class="no-underline hover:no-underline"><div anchor-id="new-response-s3file" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">new Response(S3File)</code></div></a><a href="#support-for-s3-compatible-services" class="no-underline hover:no-underline"><div anchor-id="support-for-s3-compatible-services" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[28px]">Support for S3-Compatible Services</div></a><a href="#using-bun-s-s3client-with-aws-s3" class="no-underline hover:no-underline"><div anchor-id="using-bun-s-s3client-with-aws-s3" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Using Bun&#x27;s S3Client with AWS S3</div></a><a href="#using-bun-s-s3client-with-google-cloud-storage" class="no-underline hover:no-underline"><div anchor-id="using-bun-s-s3client-with-google-cloud-storage" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Using Bun&#x27;s S3Client with Google Cloud Storage</div></a><a href="#using-bun-s-s3client-with-cloudflare-r2" class="no-underline hover:no-underline"><div anchor-id="using-bun-s-s3client-with-cloudflare-r2" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Using Bun&#x27;s S3Client with Cloudflare R2</div></a><a href="#using-bun-s-s3client-with-digitalocean-spaces" class="no-underline hover:no-underline"><div anchor-id="using-bun-s-s3client-with-digitalocean-spaces" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Using Bun&#x27;s S3Client with DigitalOcean Spaces</div></a><a href="#using-bun-s-s3client-with-minio" class="no-underline hover:no-underline"><div anchor-id="using-bun-s-s3client-with-minio" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Using Bun&#x27;s S3Client with MinIO</div></a><a href="#using-bun-s-s3client-with-supabase" class="no-underline hover:no-underline"><div anchor-id="using-bun-s-s3client-with-supabase" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Using Bun&#x27;s S3Client with supabase</div></a><a href="#using-bun-s-s3client-with-s3-virtual-hosted-style-endpoints" class="no-underline hover:no-underline"><div anchor-id="using-bun-s-s3client-with-s3-virtual-hosted-style-endpoints" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Using Bun&#x27;s S3Client with S3 Virtual Hosted-Style endpoints</div></a><a href="#credentials" class="no-underline hover:no-underline"><div anchor-id="credentials" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[28px]">Credentials</div></a><a href="#s3client-objects" class="no-underline hover:no-underline"><div anchor-id="s3client-objects" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">S3Client</code> objects</div></a><a href="#s3client-prototype-write" class="no-underline hover:no-underline"><div anchor-id="s3client-prototype-write" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">S3Client.prototype.write</code></div></a><a href="#s3client-prototype-delete" class="no-underline hover:no-underline"><div anchor-id="s3client-prototype-delete" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">S3Client.prototype.delete</code></div></a><a href="#s3client-prototype-exists" class="no-underline hover:no-underline"><div anchor-id="s3client-prototype-exists" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">S3Client.prototype.exists</code></div></a><a href="#s3file" class="no-underline hover:no-underline"><div anchor-id="s3file" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[28px]"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">S3File</code></div></a><a href="#partial-reads-with-slice" class="no-underline hover:no-underline"><div anchor-id="partial-reads-with-slice" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Partial reads with <code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">slice</code></div></a><a href="#deleting-files-from-s3" class="no-underline hover:no-underline"><div anchor-id="deleting-files-from-s3" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">Deleting files from S3</div></a><a href="#error-codes" class="no-underline hover:no-underline"><div anchor-id="error-codes" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[28px]">Error codes</div></a><a href="#s3client-static-methods" class="no-underline hover:no-underline"><div anchor-id="s3client-static-methods" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[28px]"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">S3Client</code> static methods</div></a><a href="#s3client-presign-static" class="no-underline hover:no-underline"><div anchor-id="s3client-presign-static" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">S3Client.presign</code> (static)</div></a><a href="#s3client-exists-static" class="no-underline hover:no-underline"><div anchor-id="s3client-exists-static" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">S3Client.exists</code> (static)</div></a><a href="#s3client-stat-static" class="no-underline hover:no-underline"><div anchor-id="s3client-stat-static" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">S3Client.stat</code> (static)</div></a><a href="#s3client-delete-static" class="no-underline hover:no-underline"><div anchor-id="s3client-delete-static" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">S3Client.delete</code> (static)</div></a><a href="#s3-protocol" class="no-underline hover:no-underline"><div anchor-id="s3-protocol" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[28px]"><code class="undefined mono rounded border border-gray-300 bg-[var(--gray-200)] px-[3px] py-[2px] text-[93%] no-underline hover:no-underline dark:border-gray-700 dark:bg-[var(--gray-700)]">s3://</code> protocol</div></a><a href="#utf-8-utf-16-and-bom-byte-order-mark" class="no-underline hover:no-underline"><div anchor-id="utf-8-utf-16-and-bom-byte-order-mark" class="doc-menu-in-page-item cursor-pointer border-l-[1px] border-gray-200 py-[2px] text-[14px] text-gray-500 hover:border-gray-400 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-400 dark:hover:text-gray-300 pl-[40px]">UTF-8, UTF-16, and BOM (byte order mark)</div></a><style> .doc-menu-in-page *{ text-align: left; } .doc-menu-in-page .doc-menu-in-page-item-active { border-color: var(--gray-400); /* gray-400 */ } .dark .doc-menu-in-page .doc-menu-in-page-item-active { // border-color: var(--gray-600); /* gray-400 */ } .doc-menu-in-page .doc-menu-in-page-item-active ~ .doc-menu-in-page-item-active { border-color: var(--gray-200); /* gray-200 */ } .dark .doc-menu-in-page .doc-menu-in-page-item-active ~ .doc-menu-in-page-item-active { // border-color: var(--gray-800); /* gray-200 */ } </style><script>(function(){let pageLoaded=false;window.addEventListener("DOMContentLoaded",(event)=>{pageLoaded=true});let options={root:null,rootMargin:"0px",threshold:1};const callback=(_entries,observer)=>{if(!pageLoaded)return;const entries=[..._entries];const activeCount=document.querySelectorAll(".doc-menu-in-page-item-active").length;const frame=document.documentElement||document.body;if(!frame)return;const allItems=[...document.querySelectorAll("h1.anchored, h2.anchored, h3.anchored")];const frameHeight=frame.offsetHeight;const frameTop=frame.scrollTop;const frameBottom=frameTop+frameHeight;const aboveViewport=[];const onViewport=[];for(const item of allItems){const itemTop=item.offsetTop;const itemHeight=item.offsetHeight;const itemBottom=item.offsetTop+item.offsetHeight;const isAboveViewport=itemTop<frameTop;const isBelowViewport=itemTop>frameBottom-item.offsetHeight;const isVisible=!isAboveViewport&&!isBelowViewport;if(isAboveViewport){aboveViewport.push(item)}else if(isVisible){onViewport.push(item)}}const activeItems=onViewport.length>0?onViewport:aboveViewport.slice(-1);for(const item of allItems){const hid=item.getAttribute("anchor-id");const menuItem=document.querySelector(".doc-menu-in-page-item[anchor-id='"+hid+"']");if(activeItems.includes(item)){try{menuItem.classList.add("doc-menu-in-page-item-active")}catch(err){console.log("error adding class "+hid)}const menuItemTop=menuItem.offsetTop;const menuItemHeight=menuItem.offsetHeight;const menuItemFrame=menuItem.offsetParent;if(!menuItemFrame)continue;const frameHeight=menuItemFrame.offsetHeight;const frameTop=menuItemFrame.scrollTop;const frameBottom=frameTop+frameHeight}else{try{menuItem.classList.remove("doc-menu-in-page-item-active")}catch(err){console.log("error adding class "+hid)}}}};window.addEventListener("DOMContentLoaded",(event)=>{let observer=new IntersectionObserver(callback,options);document.querySelectorAll("h1.anchored, h2.anchored, h3.anchored").forEach((item)=>{observer.observe(item)})})})();</script></div><a href="/docs/api/file-io" slug="api/file-io" id="menu-item-api/file-io" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">File I/O</p></a><a href="/docs/api/import-meta" slug="api/import-meta" id="menu-item-api/import-meta" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">import.meta</p></a><a href="/docs/api/sqlite" slug="api/sqlite" id="menu-item-api/sqlite" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">SQLite</p></a><a href="/docs/api/file-system-router" slug="api/file-system-router" id="menu-item-api/file-system-router" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">FileSystemRouter</p></a><a href="/docs/api/tcp" slug="api/tcp" id="menu-item-api/tcp" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">TCP sockets</p></a><a href="/docs/api/udp" slug="api/udp" id="menu-item-api/udp" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">UDP sockets</p></a><a href="/docs/api/globals" slug="api/globals" id="menu-item-api/globals" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Globals</p></a><a href="/docs/runtime/shell" slug="runtime/shell" id="menu-item-runtime/shell" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">$ Shell</p></a><a href="/docs/api/spawn" slug="api/spawn" id="menu-item-api/spawn" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Child processes</p></a><a href="/docs/api/html-rewriter" slug="api/html-rewriter" id="menu-item-api/html-rewriter" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">HTMLRewriter</p></a><a href="/docs/api/hashing" slug="api/hashing" id="menu-item-api/hashing" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Hashing</p></a><a href="/docs/api/console" slug="api/console" id="menu-item-api/console" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Console</p></a><a href="/docs/api/cookie" slug="api/cookie" id="menu-item-api/cookie" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Cookie</p></a><a href="/docs/api/ffi" slug="api/ffi" id="menu-item-api/ffi" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">FFI</p></a><a href="/docs/api/cc" slug="api/cc" id="menu-item-api/cc" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">C Compiler</p></a><a href="/docs/api/test" slug="api/test" id="menu-item-api/test" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Testing</p></a><a href="/docs/api/utils" slug="api/utils" id="menu-item-api/utils" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Utils</p></a><a href="/docs/api/node-api" slug="api/node-api" id="menu-item-api/node-api" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Node-API</p></a><a href="/docs/api/glob" slug="api/glob" id="menu-item-api/glob" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Glob</p></a><a href="/docs/api/dns" slug="api/dns" id="menu-item-api/dns" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">DNS</p></a><a href="/docs/api/semver" slug="api/semver" id="menu-item-api/semver" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Semver</p></a><a href="/docs/api/color" slug="api/color" id="menu-item-api/color" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Color</p></a><a href="/docs/api/transpiler" slug="api/transpiler" id="menu-item-api/transpiler" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Transpiler</p></a><p class="whitespace-nowrap py-2 pt-8 text-[15px] text-gray-400 dark:text-gray-400 " style="font-variant:all-petite-caps">Project</p><a href="/docs/project/roadmap" slug="project/roadmap" id="menu-item-project/roadmap" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Roadmap</p></a><a href="/docs/project/benchmarking" slug="project/benchmarking" id="menu-item-project/benchmarking" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Benchmarking</p></a><a href="/docs/project/contributing" slug="project/contributing" id="menu-item-project/contributing" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Contributing</p></a><a href="/docs/project/building-windows" slug="project/building-windows" id="menu-item-project/building-windows" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Building Windows</p></a><a href="/docs/project/bindgen" slug="project/bindgen" id="menu-item-project/bindgen" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">Bindgen</p></a><a href="/docs/project/licensing" slug="project/licensing" id="menu-item-project/licensing" class="no-underline hover:no-underline doc-menu-item"><p class="border-l-[1px] py-[2px] pl-4 text-[15px] text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-700 hover:border-gray-700 hover:text-gray-900 dark:hover:border-gray-400 dark:hover:text-gray-200">License</p></a></div><script>document.querySelectorAll(".doc-menu-item").forEach((el)=>{el.addEventListener("click",()=>{const menu=document.querySelector("#doc-menu");const inPageMenu=document.querySelector("#doc-menu-in-page");const A=menu.scrollTop;const B=el.offsetTop;const C=inPageMenu?inPageMenu.offsetTop:0;const D=inPageMenu?inPageMenu.offsetHeight:0;const E=B>C?A-D:A;localStorage.setItem("menu-clicked-offset",E)})});const menu=document.querySelector("#doc-menu");const offset=localStorage.getItem("menu-clicked-offset");if(!offset){menu.classList.remove("invisible")}else{menu.scrollTop=parseInt(offset,10);localStorage.removeItem("menu-clicked-offset");menu.classList.remove("invisible")}</script><div class="h-[50px]" style="height:50px"></div></div><div class="w-full overflow-x-hidden pb-8"><header class="ml-auto mr-auto w-full max-w-screen-md pt-[45px] md:pt-[90px]"><div class="mx-4 flex flex-row justify-between border-b border-gray-200 text-gray-900 dark:border-gray-700 dark:text-gray-200"><h1 class="mb-0 flex-1"><span class="text-[2.25em] font-extrabold">S3 Object Storage</span></h1></div><div class="hidden px-4 pt-[6px] text-xs text-black sm:block"><a class="hover:no-underline" href="https://github.com/oven-sh/bun/edit/main/docs/api/s3.md"><div class="inline-flex cursor-pointer flex-row items-center justify-start rounded-[3px] px-[4px]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42NiA1LjIzIDMuMzggNC40MSAzLjgyIDMuMzFDMy44MiAzLjMxIDQuNDkgMy4xIDYuMDIgNC4xM0M2LjY2IDMuOTUgNy4zNCAzLjg2IDguMDIgMy44NkM4LjcgMy44NiA5LjM4IDMuOTUgMTAuMDIgNC4xM0MxMS41NSAzLjA5IDEyLjIyIDMuMzEgMTIuMjIgMy4zMUMxMi42NiA0LjQxIDEyLjM4IDUuMjMgMTIuMyA1LjQzQzEyLjgxIDUuOTkgMTMuMTIgNi43IDEzLjEyIDcuNThDMTMuMTIgMTAuNjUgMTEuMjUgMTEuMzMgOS40NyAxMS41M0M5Ljc2IDExLjc4IDEwLjAxIDEyLjI2IDEwLjAxIDEzLjAxQzEwLjAxIDE0LjA4IDEwIDE0Ljk0IDEwIDE1LjIxQzEwIDE1LjQyIDEwLjE1IDE1LjY3IDEwLjU1IDE1LjU5QzEzLjcxIDE0LjUzIDE2IDExLjUzIDE2IDhDMTYgMy41OCAxMi40MiAwIDggMFoiIHRyYW5zZm9ybT0ic2NhbGUoNjQpIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K" alt="GitHub logo" class="m-[0] hidden h-[13px] p-[0] dark:block"/><div class="w-[4px] "></div><p class="m-[0] p-[0] text-gray-800 dark:text-gray-300">Edit on GitHub</p></div></a></div></header><div class="DocSearch-content prose ml-auto mr-auto w-full max-w-screen-md px-4 dark:prose-invert"><div class="h-4 whitespace-nowrap"></div><article><p>Production servers often read, upload, and write files to S3-compatible object storage services instead of the local filesystem. Historically, that means local filesystem APIs you use in development can&#x27;t be used in production. When you use Bun, things are different.</p><div class="callout dark mx-[calc(-1*var(--horizontal-padding))] my-0 border-b border-t border-b-gray-200 border-t-gray-200 bg-gray-100 px-4 py-[13px] text-[92%] leading-6 dark:border-b-gray-900 dark:border-t-gray-900 dark:bg-gray-800 md:mx-0 md:my-5 md:rounded-[5px] md:border md:border-gray-200 md:py-[13px] dark:md:border-gray-900"><h3 level="3" anchor-id="bun-s-s3-api-is-fast" id="bun-s-s3-api-is-fast" class="anchored "><a name="bun-s-s3-api-is-fast" class="relative top-[-80px] h-0 invisible block"></a><a href="#bun-s-s3-api-is-fast" class="no-underline hover:no-underline font-bold hover:none cursor-default">Bun&#x27;s S3 API is fast</a></h3><figure class="align-center sm-full flex flex-col justify-start overflow-hidden md:rounded-[5px]"><a target="_blank" href="https://bun.sh/bun-s3-node.gif"><img src="https://bun.sh/bun-s3-node.gif" alt="Bun&#x27;s S3 API is fast" caption="Left: Bun v1.1.44. Right: Node.js v23.6.0"/></a><figcaption class="text-center text-sm">Left: Bun v1.1.44. Right: Node.js v23.6.0</figcaption></figure></div><p>Bun provides fast, native bindings for interacting with S3-compatible object storage services. Bun&#x27;s S3 API is designed to be simple and feel similar to fetch&#x27;s <code>Response</code> and <code>Blob</code> APIs (like Bun&#x27;s local filesystem APIs).</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { s3, write, S3Client } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Bun.s3 reads environment variables for credentials</span></span> <span class="line"><span style="color: #6272A4">// file() returns a lazy reference to a file on S3</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> metadata </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> s3.</span><span style="color: #50FA7B">file</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">123.json</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">);</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Download from S3 as JSON</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> data </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> metadata.</span><span style="color: #50FA7B">json</span><span style="color: #F8F8F2">();</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Upload to S3</span></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">write</span><span style="color: #F8F8F2">(metadata, </span><span style="color: #BD93F9">JSON</span><span style="color: #F8F8F2">.</span><span style="color: #8BE9FD">stringify</span><span style="color: #F8F8F2">({ name</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">John</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">, age</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">30</span><span style="color: #F8F8F2"> }));</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Presign a URL (synchronous - no network request needed)</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> url </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> metadata.</span><span style="color: #50FA7B">presign</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> acl</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">public-read</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> expiresIn</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">60</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">*</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">60</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">*</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">24</span><span style="color: #F8F8F2">, </span><span style="color: #6272A4">// 1 day</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Delete the file</span></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> metadata.</span><span style="color: #50FA7B">delete</span><span style="color: #F8F8F2">();</span></span> <span class="line"></span></code></pre></div><div id="JTnTGCKmsBMJ" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#JTnTGCKmsBMJ");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { s3, write, S3Client } from "bun"; // Bun.s3 reads environment variables for credentials // file() returns a lazy reference to a file on S3 const metadata = s3.file("123.json"); // Download from S3 as JSON const data = await metadata.json(); // Upload to S3 await write(metadata, JSON.stringify({ name: "John", age: 30 })); // Presign a URL (synchronous - no network request needed) const url = metadata.presign({ acl: "public-read", expiresIn: 60 * 60 * 24, // 1 day }); // Delete the file await metadata.delete();`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><p>S3 is the <a href="https://en.wikipedia.org/wiki/De_facto_standard">de facto standard</a> internet filesystem. Bun&#x27;s S3 API works with S3-compatible storage services like:</p><ul><li class="">AWS S3</li><li class="">Cloudflare R2</li><li class="">DigitalOcean Spaces</li><li class="">MinIO</li><li class="">Backblaze B2</li><li class="">...and any other S3-compatible storage service</li></ul><h2 level="2" anchor-id="basic-usage" id="basic-usage" class="anchored "><a name="basic-usage" class="relative top-[-80px] h-0 invisible block"></a><a href="#basic-usage" class="no-underline hover:no-underline font-bold hover:none cursor-default">Basic Usage</a></h2><p>There are several ways to interact with Bun&#x27;s S3 API.</p><h3 level="3" anchor-id="bun-s3client-bun-s3" id="bun-s3client-bun-s3" class="anchored "><a name="bun-s3client-bun-s3" class="relative top-[-80px] h-0 invisible block"></a><a href="#bun-s3client-bun-s3" class="no-underline hover:no-underline font-bold hover:none cursor-default"><code>Bun.S3Client</code> &amp; <code>Bun.s3</code></a></h3><p><code>Bun.s3</code> is equivalent to <code>new Bun.S3Client()</code>, relying on environment variables for credentials.</p><p>To explicitly set credentials, pass them to the <code>Bun.S3Client</code> constructor.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { S3Client } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> client </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">S3Client</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// sessionToken: &quot;...&quot;</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// acl: &quot;public-read&quot;,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// endpoint: &quot;https://s3.us-east-1.amazonaws.com&quot;,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// endpoint: &quot;https://&lt;account-id&gt;.r2.cloudflarestorage.com&quot;, // Cloudflare R2</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// endpoint: &quot;https://&lt;region&gt;.digitaloceanspaces.com&quot;, // DigitalOcean Spaces</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// endpoint: &quot;http://localhost:9000&quot;, // MinIO</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Bun.s3 is a global singleton that is equivalent to `new Bun.S3Client()`</span></span> <span class="line"></span></code></pre></div><div id="XdadhInJLTes" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#XdadhInJLTes");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { S3Client } from "bun"; const client = new S3Client({ accessKeyId: "your-access-key", secretAccessKey: "your-secret-key", bucket: "my-bucket", // sessionToken: "..." // acl: "public-read", // endpoint: "https://s3.us-east-1.amazonaws.com", // endpoint: "https://<account-id>.r2.cloudflarestorage.com", // Cloudflare R2 // endpoint: "https://<region>.digitaloceanspaces.com", // DigitalOcean Spaces // endpoint: "http://localhost:9000", // MinIO }); // Bun.s3 is a global singleton that is equivalent to \`new Bun.S3Client()\``).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="working-with-s3-files" id="working-with-s3-files" class="anchored "><a name="working-with-s3-files" class="relative top-[-80px] h-0 invisible block"></a><a href="#working-with-s3-files" class="no-underline hover:no-underline font-bold hover:none cursor-default">Working with S3 Files</a></h3><p>The <strong><code>file</code></strong> method in <code>S3Client</code> returns a <strong>lazy reference to a file on S3</strong>.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #6272A4">// A lazy reference to a file on S3</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> s3file</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">S3File</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> client.</span><span style="color: #50FA7B">file</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">123.json</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">);</span></span> <span class="line"></span></code></pre></div><div id="vjCwbPjpVeLI" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#vjCwbPjpVeLI");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`// A lazy reference to a file on S3 const s3file: S3File = client.file("123.json");`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><p>Like <code>Bun.file(path)</code>, the <code>S3Client</code>&#x27;s <code>file</code> method is synchronous. It does zero network requests until you call a method that depends on a network request.</p><h3 level="3" anchor-id="reading-files-from-s3" id="reading-files-from-s3" class="anchored "><a name="reading-files-from-s3" class="relative top-[-80px] h-0 invisible block"></a><a href="#reading-files-from-s3" class="no-underline hover:no-underline font-bold hover:none cursor-default">Reading files from S3</a></h3><p>If you&#x27;ve used the <code>fetch</code> API, you&#x27;re familiar with the <code>Response</code> and <code>Blob</code> APIs. <code>S3File</code> extends <code>Blob</code>. The same methods that work on <code>Blob</code> also work on <code>S3File</code>.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #6272A4">// Read an S3File as text</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> text </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">text</span><span style="color: #F8F8F2">();</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Read an S3File as JSON</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> json </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">json</span><span style="color: #F8F8F2">();</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Read an S3File as an ArrayBuffer</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> buffer </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">arrayBuffer</span><span style="color: #F8F8F2">();</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Get only the first 1024 bytes</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> partial </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">slice</span><span style="color: #F8F8F2">(</span><span style="color: #BD93F9">0</span><span style="color: #F8F8F2">, </span><span style="color: #BD93F9">1024</span><span style="color: #F8F8F2">).</span><span style="color: #50FA7B">text</span><span style="color: #F8F8F2">();</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Stream the file</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> stream </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">stream</span><span style="color: #F8F8F2">();</span></span> <span class="line"><span style="color: #FF79C6">for</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> (</span><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> chunk </span><span style="color: #FF79C6">of</span><span style="color: #F8F8F2"> stream) {</span></span> <span class="line"><span style="color: #F8F8F2"> console.</span><span style="color: #50FA7B">log</span><span style="color: #F8F8F2">(chunk);</span></span> <span class="line"><span style="color: #F8F8F2">}</span></span> <span class="line"></span></code></pre></div><div id="jgQSUcDXCAci" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#jgQSUcDXCAci");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`// Read an S3File as text const text = await s3file.text(); // Read an S3File as JSON const json = await s3file.json(); // Read an S3File as an ArrayBuffer const buffer = await s3file.arrayBuffer(); // Get only the first 1024 bytes const partial = await s3file.slice(0, 1024).text(); // Stream the file const stream = s3file.stream(); for await (const chunk of stream) { console.log(chunk); }`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h4 level="4" id="memory-optimization">Memory optimization</h4><p>Methods like <code>text()</code>, <code>json()</code>, <code>bytes()</code>, or <code>arrayBuffer()</code> avoid duplicating the string or bytes in memory when possible.</p><p>If the text happens to be ASCII, Bun directly transfers the string to JavaScriptCore (the engine) without transcoding and without duplicating the string in memory. When you use <code>.bytes()</code> or <code>.arrayBuffer()</code>, it will also avoid duplicating the bytes in memory.</p><p>These helper methods not only simplify the API, they also make it faster.</p><h3 level="3" anchor-id="writing-uploading-files-to-s3" id="writing-uploading-files-to-s3" class="anchored "><a name="writing-uploading-files-to-s3" class="relative top-[-80px] h-0 invisible block"></a><a href="#writing-uploading-files-to-s3" class="no-underline hover:no-underline font-bold hover:none cursor-default">Writing &amp; uploading files to S3</a></h3><p>Writing to S3 is just as simple.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #6272A4">// Write a string (replacing the file)</span></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">write</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">Hello World!</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">);</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Write a Buffer (replacing the file)</span></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">write</span><span style="color: #F8F8F2">(Buffer.</span><span style="color: #50FA7B">from</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">Hello World!</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">));</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Write a Response (replacing the file)</span></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">write</span><span style="color: #F8F8F2">(</span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">Response</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">Hello World!</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">));</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Write with content type</span></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">write</span><span style="color: #F8F8F2">(</span><span style="color: #BD93F9">JSON</span><span style="color: #F8F8F2">.</span><span style="color: #8BE9FD">stringify</span><span style="color: #F8F8F2">({ name</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">John</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">, age</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">30</span><span style="color: #F8F8F2"> }), {</span></span> <span class="line"><span style="color: #F8F8F2"> type</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">application/json</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Write using a writer (streaming)</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> writer </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">writer</span><span style="color: #F8F8F2">({ type</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">application/json</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2"> });</span></span> <span class="line"><span style="color: #F8F8F2">writer.</span><span style="color: #50FA7B">write</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">Hello</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">);</span></span> <span class="line"><span style="color: #F8F8F2">writer.</span><span style="color: #50FA7B">write</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C"> World!</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">);</span></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> writer.</span><span style="color: #50FA7B">end</span><span style="color: #F8F8F2">();</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Write using Bun.write</span></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> Bun.</span><span style="color: #50FA7B">write</span><span style="color: #F8F8F2">(s3file, </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">Hello World!</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">);</span></span> <span class="line"></span></code></pre></div><div id="kvrcNJDmcZTc" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#kvrcNJDmcZTc");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`// Write a string (replacing the file) await s3file.write("Hello World!"); // Write a Buffer (replacing the file) await s3file.write(Buffer.from("Hello World!")); // Write a Response (replacing the file) await s3file.write(new Response("Hello World!")); // Write with content type await s3file.write(JSON.stringify({ name: "John", age: 30 }), { type: "application/json", }); // Write using a writer (streaming) const writer = s3file.writer({ type: "application/json" }); writer.write("Hello"); writer.write(" World!"); await writer.end(); // Write using Bun.write await Bun.write(s3file, "Hello World!");`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="working-with-large-files-streams" id="working-with-large-files-streams" class="anchored "><a name="working-with-large-files-streams" class="relative top-[-80px] h-0 invisible block"></a><a href="#working-with-large-files-streams" class="no-underline hover:no-underline font-bold hover:none cursor-default">Working with large files (streams)</a></h3><p>Bun automatically handles multipart uploads for large files and provides streaming capabilities. The same API that works for local files also works for S3 files.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #6272A4">// Write a large file</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> bigFile </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> Buffer.</span><span style="color: #50FA7B">alloc</span><span style="color: #F8F8F2">(</span><span style="color: #BD93F9">10</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">*</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">1024</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">*</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">1024</span><span style="color: #F8F8F2">); </span><span style="color: #6272A4">// 10MB</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> writer </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">writer</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// Automatically retry on network errors up to 3 times</span></span> <span class="line"><span style="color: #F8F8F2"> retry</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">3</span><span style="color: #F8F8F2">,</span></span> <span class="line"></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// Queue up to 10 requests at a time</span></span> <span class="line"><span style="color: #F8F8F2"> queueSize</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">10</span><span style="color: #F8F8F2">,</span></span> <span class="line"></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// Upload in 5 MB chunks</span></span> <span class="line"><span style="color: #F8F8F2"> partSize</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">5</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">*</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">1024</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">*</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">1024</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"><span style="color: #FF79C6">for</span><span style="color: #F8F8F2"> (</span><span style="color: #FF79C6">let</span><span style="color: #F8F8F2"> i </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">0</span><span style="color: #F8F8F2">; i </span><span style="color: #FF79C6">&lt;</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">10</span><span style="color: #F8F8F2">; i</span><span style="color: #FF79C6">++</span><span style="color: #F8F8F2">) {</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> writer.</span><span style="color: #50FA7B">write</span><span style="color: #F8F8F2">(bigFile);</span></span> <span class="line"><span style="color: #F8F8F2">}</span></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> writer.</span><span style="color: #50FA7B">end</span><span style="color: #F8F8F2">();</span></span> <span class="line"></span></code></pre></div><div id="XwFqmxvmTumK" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#XwFqmxvmTumK");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`// Write a large file const bigFile = Buffer.alloc(10 * 1024 * 1024); // 10MB const writer = s3file.writer({ // Automatically retry on network errors up to 3 times retry: 3, // Queue up to 10 requests at a time queueSize: 10, // Upload in 5 MB chunks partSize: 5 * 1024 * 1024, }); for (let i = 0; i < 10; i++) { await writer.write(bigFile); } await writer.end();`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h2 level="2" anchor-id="presigning-urls" id="presigning-urls" class="anchored "><a name="presigning-urls" class="relative top-[-80px] h-0 invisible block"></a><a href="#presigning-urls" class="no-underline hover:no-underline font-bold hover:none cursor-default">Presigning URLs</a></h2><p>When your production service needs to let users upload files to your server, it&#x27;s often more reliable for the user to upload directly to S3 instead of your server acting as an intermediary.</p><p>To facilitate this, you can presign URLs for S3 files. This generates a URL with a signature that allows a user to securely upload that specific file to S3, without exposing your credentials or granting them unnecessary access to your bucket.</p><p>The default behaviour is to generate a <code>GET</code> URL that expires in 24 hours. Bun attempts to infer the content type from the file extension. If inference is not possible, it will default to <code>application/octet-stream</code>.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { s3 } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Generate a presigned URL that expires in 24 hours (default)</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> download </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> s3.</span><span style="color: #50FA7B">presign</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">); </span><span style="color: #6272A4">// GET, text/plain, expires in 24 hours</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> upload </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> s3.</span><span style="color: #50FA7B">presign</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-file</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">, {</span></span> <span class="line"><span style="color: #F8F8F2"> expiresIn</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">3600</span><span style="color: #F8F8F2">, </span><span style="color: #6272A4">// 1 hour</span></span> <span class="line"><span style="color: #F8F8F2"> method</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">PUT</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> type</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">application/json</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">, </span><span style="color: #6272A4">// No extension for inferring, so we can specify the content type to be JSON</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// You can call .presign() if on a file reference, but avoid doing so</span></span> <span class="line"><span style="color: #6272A4">// unless you already have a reference (to avoid memory usage).</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> myFile </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> s3.</span><span style="color: #50FA7B">file</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">);</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> presignedFile </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> myFile.</span><span style="color: #50FA7B">presign</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> expiresIn</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">3600</span><span style="color: #F8F8F2">, </span><span style="color: #6272A4">// 1 hour</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span></code></pre></div><div id="uvosPVxJJBrT" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#uvosPVxJJBrT");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { s3 } from "bun"; // Generate a presigned URL that expires in 24 hours (default) const download = s3.presign("my-file.txt"); // GET, text/plain, expires in 24 hours const upload = s3.presign("my-file", { expiresIn: 3600, // 1 hour method: "PUT", type: "application/json", // No extension for inferring, so we can specify the content type to be JSON }); // You can call .presign() if on a file reference, but avoid doing so // unless you already have a reference (to avoid memory usage). const myFile = s3.file("my-file.txt"); const presignedFile = myFile.presign({ expiresIn: 3600, // 1 hour });`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="setting-acls" id="setting-acls" class="anchored "><a name="setting-acls" class="relative top-[-80px] h-0 invisible block"></a><a href="#setting-acls" class="no-underline hover:no-underline font-bold hover:none cursor-default">Setting ACLs</a></h3><p>To set an ACL (access control list) on a presigned URL, pass the <code>acl</code> option:</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> url </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">presign</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> acl</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">public-read</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> expiresIn</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">3600</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span></code></pre></div><div id="NTauMFAOXuVQ" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#NTauMFAOXuVQ");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`const url = s3file.presign({ acl: "public-read", expiresIn: 3600, });`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><p>You can pass any of the following ACLs:</p><div class="TableWrapper"><table><thead><tr><th>ACL</th><th>Explanation</th></tr></thead><tbody><tr><td><code>&quot;public-read&quot;</code></td><td>The object is readable by the public.</td></tr><tr><td><code>&quot;private&quot;</code></td><td>The object is readable only by the bucket owner.</td></tr><tr><td><code>&quot;public-read-write&quot;</code></td><td>The object is readable and writable by the public.</td></tr><tr><td><code>&quot;authenticated-read&quot;</code></td><td>The object is readable by the bucket owner and authenticated users.</td></tr><tr><td><code>&quot;aws-exec-read&quot;</code></td><td>The object is readable by the AWS account that made the request.</td></tr><tr><td><code>&quot;bucket-owner-read&quot;</code></td><td>The object is readable by the bucket owner.</td></tr><tr><td><code>&quot;bucket-owner-full-control&quot;</code></td><td>The object is readable and writable by the bucket owner.</td></tr><tr><td><code>&quot;log-delivery-write&quot;</code></td><td>The object is writable by AWS services used for log delivery.</td></tr></tbody></table></div><h3 level="3" anchor-id="expiring-urls" id="expiring-urls" class="anchored "><a name="expiring-urls" class="relative top-[-80px] h-0 invisible block"></a><a href="#expiring-urls" class="no-underline hover:no-underline font-bold hover:none cursor-default">Expiring URLs</a></h3><p>To set an expiration time for a presigned URL, pass the <code>expiresIn</code> option.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> url </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">presign</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// Seconds</span></span> <span class="line"><span style="color: #F8F8F2"> expiresIn</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">3600</span><span style="color: #F8F8F2">, </span><span style="color: #6272A4">// 1 hour</span></span> <span class="line"></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// access control list</span></span> <span class="line"><span style="color: #F8F8F2"> acl</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">public-read</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// HTTP method</span></span> <span class="line"><span style="color: #F8F8F2"> method</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">PUT</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span></code></pre></div><div id="dNAZMhXulvqd" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#dNAZMhXulvqd");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`const url = s3file.presign({ // Seconds expiresIn: 3600, // 1 hour // access control list acl: "public-read", // HTTP method method: "PUT", });`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="method" id="method" class="anchored "><a name="method" class="relative top-[-80px] h-0 invisible block"></a><a href="#method" class="no-underline hover:no-underline font-bold hover:none cursor-default"><code>method</code></a></h3><p>To set the HTTP method for a presigned URL, pass the <code>method</code> option.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> url </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">presign</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> method</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">PUT</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// method: &quot;DELETE&quot;,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// method: &quot;GET&quot;,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// method: &quot;HEAD&quot;,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// method: &quot;POST&quot;,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// method: &quot;PUT&quot;,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span></code></pre></div><div id="hDpTPuKldtzr" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#hDpTPuKldtzr");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`const url = s3file.presign({ method: "PUT", // method: "DELETE", // method: "GET", // method: "HEAD", // method: "POST", // method: "PUT", });`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="new-response-s3file" id="new-response-s3file" class="anchored "><a name="new-response-s3file" class="relative top-[-80px] h-0 invisible block"></a><a href="#new-response-s3file" class="no-underline hover:no-underline font-bold hover:none cursor-default"><code>new Response(S3File)</code></a></h3><p>To quickly redirect users to a presigned URL for an S3 file, pass an <code>S3File</code> instance to a <code>Response</code> object as the body.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> response </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">Response</span><span style="color: #F8F8F2">(s3file);</span></span> <span class="line"><span style="color: #F8F8F2">console.</span><span style="color: #50FA7B">log</span><span style="color: #F8F8F2">(response);</span></span> <span class="line"></span></code></pre></div><div id="jmgxdNYzlIwW" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#jmgxdNYzlIwW");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`const response = new Response(s3file); console.log(response);`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><p>This will automatically redirect the user to the presigned URL for the S3 file, saving you the memory, time, and bandwidth cost of downloading the file to your server and sending it back to the user.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #50FA7B">Response</span><span style="color: #F8F8F2"> (</span><span style="color: #BD93F9">0</span><span style="color: #F8F8F2"> KB) {</span></span> <span class="line"><span style="color: #F8F8F2"> ok: </span><span style="color: #BD93F9">false</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> url: </span><span style="color: #E9F284">&quot;&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> status: </span><span style="color: #BD93F9">302</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> statusText: </span><span style="color: #E9F284">&quot;&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> headers: Headers {</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">location</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">: </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">https://&lt;account-id&gt;.r2.cloudflarestorage.com/...</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> },</span></span> <span class="line"><span style="color: #F8F8F2"> redirected: </span><span style="color: #BD93F9">true</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bodyUsed: </span><span style="color: #BD93F9">false</span></span> <span class="line"><span style="color: #F8F8F2">}</span></span> <span class="line"></span></code></pre></div><div id="oIoBntVXaaRR" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#oIoBntVXaaRR");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`Response (0 KB) { ok: false, url: "", status: 302, statusText: "", headers: Headers { "location": "https://<account-id>.r2.cloudflarestorage.com/...", }, redirected: true, bodyUsed: false }`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h2 level="2" anchor-id="support-for-s3-compatible-services" id="support-for-s3-compatible-services" class="anchored "><a name="support-for-s3-compatible-services" class="relative top-[-80px] h-0 invisible block"></a><a href="#support-for-s3-compatible-services" class="no-underline hover:no-underline font-bold hover:none cursor-default">Support for S3-Compatible Services</a></h2><p>Bun&#x27;s S3 implementation works with any S3-compatible storage service. Just specify the appropriate endpoint:</p><h3 level="3" anchor-id="using-bun-s-s3client-with-aws-s3" id="using-bun-s-s3client-with-aws-s3" class="anchored "><a name="using-bun-s-s3client-with-aws-s3" class="relative top-[-80px] h-0 invisible block"></a><a href="#using-bun-s-s3client-with-aws-s3" class="no-underline hover:no-underline font-bold hover:none cursor-default">Using Bun&#x27;s S3Client with AWS S3</a></h3><p>AWS S3 is the default. You can also pass a <code>region</code> option instead of an <code>endpoint</code> option for AWS S3.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { S3Client } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// AWS S3</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> s3 </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">S3Client</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// endpoint: &quot;https://s3.us-east-1.amazonaws.com&quot;,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// region: &quot;us-east-1&quot;,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span></code></pre></div><div id="PhBdkaIfmiUu" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#PhBdkaIfmiUu");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { S3Client } from "bun"; // AWS S3 const s3 = new S3Client({ accessKeyId: "access-key", secretAccessKey: "secret-key", bucket: "my-bucket", // endpoint: "https://s3.us-east-1.amazonaws.com", // region: "us-east-1", });`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="using-bun-s-s3client-with-google-cloud-storage" id="using-bun-s-s3client-with-google-cloud-storage" class="anchored "><a name="using-bun-s-s3client-with-google-cloud-storage" class="relative top-[-80px] h-0 invisible block"></a><a href="#using-bun-s-s3client-with-google-cloud-storage" class="no-underline hover:no-underline font-bold hover:none cursor-default">Using Bun&#x27;s S3Client with Google Cloud Storage</a></h3><p>To use Bun&#x27;s S3 client with <a href="https://cloud.google.com/storage">Google Cloud Storage</a>, set <code>endpoint</code> to <code>&quot;https://storage.googleapis.com&quot;</code> in the <code>S3Client</code> constructor.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { S3Client } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Google Cloud Storage</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> gcs </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">S3Client</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> endpoint</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">https://storage.googleapis.com</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span></code></pre></div><div id="wzbdIReIKhmD" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#wzbdIReIKhmD");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { S3Client } from "bun"; // Google Cloud Storage const gcs = new S3Client({ accessKeyId: "access-key", secretAccessKey: "secret-key", bucket: "my-bucket", endpoint: "https://storage.googleapis.com", });`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="using-bun-s-s3client-with-cloudflare-r2" id="using-bun-s-s3client-with-cloudflare-r2" class="anchored "><a name="using-bun-s-s3client-with-cloudflare-r2" class="relative top-[-80px] h-0 invisible block"></a><a href="#using-bun-s-s3client-with-cloudflare-r2" class="no-underline hover:no-underline font-bold hover:none cursor-default">Using Bun&#x27;s S3Client with Cloudflare R2</a></h3><p>To use Bun&#x27;s S3 client with <a href="https://developers.cloudflare.com/r2/">Cloudflare R2</a>, set <code>endpoint</code> to the R2 endpoint in the <code>S3Client</code> constructor. The R2 endpoint includes your account ID.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { S3Client } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// CloudFlare R2</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> r2 </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">S3Client</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> endpoint</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">https://&lt;account-id&gt;.r2.cloudflarestorage.com</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span></code></pre></div><div id="cADbqrqLkaZx" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#cADbqrqLkaZx");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { S3Client } from "bun"; // CloudFlare R2 const r2 = new S3Client({ accessKeyId: "access-key", secretAccessKey: "secret-key", bucket: "my-bucket", endpoint: "https://<account-id>.r2.cloudflarestorage.com", });`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="using-bun-s-s3client-with-digitalocean-spaces" id="using-bun-s-s3client-with-digitalocean-spaces" class="anchored "><a name="using-bun-s-s3client-with-digitalocean-spaces" class="relative top-[-80px] h-0 invisible block"></a><a href="#using-bun-s-s3client-with-digitalocean-spaces" class="no-underline hover:no-underline font-bold hover:none cursor-default">Using Bun&#x27;s S3Client with DigitalOcean Spaces</a></h3><p>To use Bun&#x27;s S3 client with <a href="https://www.digitalocean.com/products/spaces/">DigitalOcean Spaces</a>, set <code>endpoint</code> to the DigitalOcean Spaces endpoint in the <code>S3Client</code> constructor.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { S3Client } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> spaces </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">S3Client</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// region: &quot;nyc3&quot;,</span></span> <span class="line"><span style="color: #F8F8F2"> endpoint</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">https://&lt;region&gt;.digitaloceanspaces.com</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span></code></pre></div><div id="nunfsDHgNXBE" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#nunfsDHgNXBE");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { S3Client } from "bun"; const spaces = new S3Client({ accessKeyId: "access-key", secretAccessKey: "secret-key", bucket: "my-bucket", // region: "nyc3", endpoint: "https://<region>.digitaloceanspaces.com", });`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="using-bun-s-s3client-with-minio" id="using-bun-s-s3client-with-minio" class="anchored "><a name="using-bun-s-s3client-with-minio" class="relative top-[-80px] h-0 invisible block"></a><a href="#using-bun-s-s3client-with-minio" class="no-underline hover:no-underline font-bold hover:none cursor-default">Using Bun&#x27;s S3Client with MinIO</a></h3><p>To use Bun&#x27;s S3 client with <a href="https://min.io/">MinIO</a>, set <code>endpoint</code> to the URL that MinIO is running on in the <code>S3Client</code> constructor.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { S3Client } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> minio </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">S3Client</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// Make sure to use the correct endpoint URL</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// It might not be localhost in production!</span></span> <span class="line"><span style="color: #F8F8F2"> endpoint</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">http://localhost:9000</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span></code></pre></div><div id="GCdFUMIOtYnf" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#GCdFUMIOtYnf");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { S3Client } from "bun"; const minio = new S3Client({ accessKeyId: "access-key", secretAccessKey: "secret-key", bucket: "my-bucket", // Make sure to use the correct endpoint URL // It might not be localhost in production! endpoint: "http://localhost:9000", });`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="using-bun-s-s3client-with-supabase" id="using-bun-s-s3client-with-supabase" class="anchored "><a name="using-bun-s-s3client-with-supabase" class="relative top-[-80px] h-0 invisible block"></a><a href="#using-bun-s-s3client-with-supabase" class="no-underline hover:no-underline font-bold hover:none cursor-default">Using Bun&#x27;s S3Client with supabase</a></h3><p>To use Bun&#x27;s S3 client with <a href="https://supabase.com/">supabase</a>, set <code>endpoint</code> to the supabase endpoint in the <code>S3Client</code> constructor. The supabase endpoint includes your account ID and /storage/v1/s3 path. Make sure to set Enable connection via S3 protocol on in the supabase dashboard in https://supabase.com/dashboard/project/&lt;account-id&gt;/settings/storage and to set the region informed in the same section.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { S3Client } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> supabase </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">S3Client</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> region</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">us-west-1</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> endpoint</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">https://&lt;account-id&gt;.supabase.co/storage/v1/s3/storage</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span></code></pre></div><div id="MrIezVfUIoGq" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#MrIezVfUIoGq");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { S3Client } from "bun"; const supabase = new S3Client({ accessKeyId: "access-key", secretAccessKey: "secret-key", bucket: "my-bucket", region: "us-west-1", endpoint: "https://<account-id>.supabase.co/storage/v1/s3/storage", });`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="using-bun-s-s3client-with-s3-virtual-hosted-style-endpoints" id="using-bun-s-s3client-with-s3-virtual-hosted-style-endpoints" class="anchored "><a name="using-bun-s-s3client-with-s3-virtual-hosted-style-endpoints" class="relative top-[-80px] h-0 invisible block"></a><a href="#using-bun-s-s3client-with-s3-virtual-hosted-style-endpoints" class="no-underline hover:no-underline font-bold hover:none cursor-default">Using Bun&#x27;s S3Client with S3 Virtual Hosted-Style endpoints</a></h3><p>When using a S3 Virtual Hosted-Style endpoint, you need to set the <code>virtualHostedStyle</code> option to <code>true</code> and if no endpoint is provided, Bun will use region and bucket to infer the endpoint to AWS S3, if no region is provided it will use <code>us-east-1</code>. If you provide a the endpoint, there are no need to provide the bucket name.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { S3Client } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// AWS S3 endpoint inferred from region and bucket</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> s3 </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">S3Client</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> virtualHostedStyle</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">true</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// endpoint: &quot;https://my-bucket.s3.us-east-1.amazonaws.com&quot;,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// region: &quot;us-east-1&quot;,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// AWS S3</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> s3WithEndpoint </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">S3Client</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> endpoint</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">https://&lt;bucket-name&gt;.s3.&lt;region&gt;.amazonaws.com</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> virtualHostedStyle</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">true</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Cloudflare R2</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> r2WithEndpoint </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">S3Client</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> endpoint</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">https://&lt;bucket-name&gt;.&lt;account-id&gt;.r2.cloudflarestorage.com</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> virtualHostedStyle</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">true</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span></code></pre></div><div id="PvcYUkyLeOeA" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#PvcYUkyLeOeA");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { S3Client } from "bun"; // AWS S3 endpoint inferred from region and bucket const s3 = new S3Client({ accessKeyId: "access-key", secretAccessKey: "secret-key", bucket: "my-bucket", virtualHostedStyle: true, // endpoint: "https://my-bucket.s3.us-east-1.amazonaws.com", // region: "us-east-1", }); // AWS S3 const s3WithEndpoint = new S3Client({ accessKeyId: "access-key", secretAccessKey: "secret-key", endpoint: "https://<bucket-name>.s3.<region>.amazonaws.com", virtualHostedStyle: true, }); // Cloudflare R2 const r2WithEndpoint = new S3Client({ accessKeyId: "access-key", secretAccessKey: "secret-key", endpoint: "https://<bucket-name>.<account-id>.r2.cloudflarestorage.com", virtualHostedStyle: true, });`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h2 level="2" anchor-id="credentials" id="credentials" class="anchored "><a name="credentials" class="relative top-[-80px] h-0 invisible block"></a><a href="#credentials" class="no-underline hover:no-underline font-bold hover:none cursor-default">Credentials</a></h2><p>Credentials are one of the hardest parts of using S3, and we&#x27;ve tried to make it as easy as possible. By default, Bun reads the following environment variables for credentials.</p><div class="TableWrapper"><table><thead><tr><th>Option name</th><th>Environment variable</th></tr></thead><tbody><tr><td><code>accessKeyId</code></td><td><code>S3_ACCESS_KEY_ID</code></td></tr><tr><td><code>secretAccessKey</code></td><td><code>S3_SECRET_ACCESS_KEY</code></td></tr><tr><td><code>region</code></td><td><code>S3_REGION</code></td></tr><tr><td><code>endpoint</code></td><td><code>S3_ENDPOINT</code></td></tr><tr><td><code>bucket</code></td><td><code>S3_BUCKET</code></td></tr><tr><td><code>sessionToken</code></td><td><code>S3_SESSION_TOKEN</code></td></tr></tbody></table></div><p>If the <code>S3_*</code> environment variable is not set, Bun will also check for the <code>AWS_*</code> environment variable, for each of the above options.</p><div class="TableWrapper"><table><thead><tr><th>Option name</th><th>Fallback environment variable</th></tr></thead><tbody><tr><td><code>accessKeyId</code></td><td><code>AWS_ACCESS_KEY_ID</code></td></tr><tr><td><code>secretAccessKey</code></td><td><code>AWS_SECRET_ACCESS_KEY</code></td></tr><tr><td><code>region</code></td><td><code>AWS_REGION</code></td></tr><tr><td><code>endpoint</code></td><td><code>AWS_ENDPOINT</code></td></tr><tr><td><code>bucket</code></td><td><code>AWS_BUCKET</code></td></tr><tr><td><code>sessionToken</code></td><td><code>AWS_SESSION_TOKEN</code></td></tr></tbody></table></div><p>These environment variables are read from <a href="/docs/runtime/env"><code>.env</code> files</a> or from the process environment at initialization time (<code>process.env</code> is not used for this).</p><p>These defaults are overridden by the options you pass to <code>s3.file(credentials)</code>, <code>new Bun.S3Client(credentials)</code>, or any of the methods that accept credentials. So if, for example, you use the same credentials for different buckets, you can set the credentials once in your <code>.env</code> file and then pass <code>bucket: &quot;my-bucket&quot;</code> to the <code>s3.file()</code> function without having to specify all the credentials again.</p><h3 level="3" anchor-id="s3client-objects" id="s3client-objects" class="anchored "><a name="s3client-objects" class="relative top-[-80px] h-0 invisible block"></a><a href="#s3client-objects" class="no-underline hover:no-underline font-bold hover:none cursor-default"><code>S3Client</code> objects</a></h3><p>When you&#x27;re not using environment variables or using multiple buckets, you can create a <code>S3Client</code> object to explicitly set credentials.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { S3Client } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> client </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">S3Client</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// sessionToken: &quot;...&quot;</span></span> <span class="line"><span style="color: #F8F8F2"> endpoint</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">https://s3.us-east-1.amazonaws.com</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// endpoint: &quot;https://&lt;account-id&gt;.r2.cloudflarestorage.com&quot;, // Cloudflare R2</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// endpoint: &quot;http://localhost:9000&quot;, // MinIO</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Write using a Response</span></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> file.</span><span style="color: #50FA7B">write</span><span style="color: #F8F8F2">(</span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">Response</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">Hello World!</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">));</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Presign a URL</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> url </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> file.</span><span style="color: #50FA7B">presign</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> expiresIn</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">60</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">*</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">60</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">*</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">24</span><span style="color: #F8F8F2">, </span><span style="color: #6272A4">// 1 day</span></span> <span class="line"><span style="color: #F8F8F2"> acl</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">public-read</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Delete the file</span></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> file.</span><span style="color: #50FA7B">delete</span><span style="color: #F8F8F2">();</span></span> <span class="line"></span></code></pre></div><div id="SSlidaWWMHHY" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#SSlidaWWMHHY");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { S3Client } from "bun"; const client = new S3Client({ accessKeyId: "your-access-key", secretAccessKey: "your-secret-key", bucket: "my-bucket", // sessionToken: "..." endpoint: "https://s3.us-east-1.amazonaws.com", // endpoint: "https://<account-id>.r2.cloudflarestorage.com", // Cloudflare R2 // endpoint: "http://localhost:9000", // MinIO }); // Write using a Response await file.write(new Response("Hello World!")); // Presign a URL const url = file.presign({ expiresIn: 60 * 60 * 24, // 1 day acl: "public-read", }); // Delete the file await file.delete();`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="s3client-prototype-write" id="s3client-prototype-write" class="anchored "><a name="s3client-prototype-write" class="relative top-[-80px] h-0 invisible block"></a><a href="#s3client-prototype-write" class="no-underline hover:no-underline font-bold hover:none cursor-default"><code>S3Client.prototype.write</code></a></h3><p>To upload or write a file to S3, call <code>write</code> on the <code>S3Client</code> instance.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> client </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> Bun.</span><span style="color: #50FA7B">S3Client</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> endpoint</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">https://s3.us-east-1.amazonaws.com</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> client.</span><span style="color: #50FA7B">write</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">, </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">Hello World!</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">);</span></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> client.</span><span style="color: #50FA7B">write</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">, </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">Response</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">Hello World!</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">));</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// equivalent to</span></span> <span class="line"><span style="color: #6272A4">// await client.file(&quot;my-file.txt&quot;).write(&quot;Hello World!&quot;);</span></span> <span class="line"></span></code></pre></div><div id="meteCxjJqOtW" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#meteCxjJqOtW");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`const client = new Bun.S3Client({ accessKeyId: "your-access-key", secretAccessKey: "your-secret-key", endpoint: "https://s3.us-east-1.amazonaws.com", bucket: "my-bucket", }); await client.write("my-file.txt", "Hello World!"); await client.write("my-file.txt", new Response("Hello World!")); // equivalent to // await client.file("my-file.txt").write("Hello World!");`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="s3client-prototype-delete" id="s3client-prototype-delete" class="anchored "><a name="s3client-prototype-delete" class="relative top-[-80px] h-0 invisible block"></a><a href="#s3client-prototype-delete" class="no-underline hover:no-underline font-bold hover:none cursor-default"><code>S3Client.prototype.delete</code></a></h3><p>To delete a file from S3, call <code>delete</code> on the <code>S3Client</code> instance.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> client </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> Bun.</span><span style="color: #50FA7B">S3Client</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> client.</span><span style="color: #50FA7B">delete</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">);</span></span> <span class="line"><span style="color: #6272A4">// equivalent to</span></span> <span class="line"><span style="color: #6272A4">// await client.file(&quot;my-file.txt&quot;).delete();</span></span> <span class="line"></span></code></pre></div><div id="lOuKIIiHLnmW" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#lOuKIIiHLnmW");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`const client = new Bun.S3Client({ accessKeyId: "your-access-key", secretAccessKey: "your-secret-key", bucket: "my-bucket", }); await client.delete("my-file.txt"); // equivalent to // await client.file("my-file.txt").delete();`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="s3client-prototype-exists" id="s3client-prototype-exists" class="anchored "><a name="s3client-prototype-exists" class="relative top-[-80px] h-0 invisible block"></a><a href="#s3client-prototype-exists" class="no-underline hover:no-underline font-bold hover:none cursor-default"><code>S3Client.prototype.exists</code></a></h3><p>To check if a file exists in S3, call <code>exists</code> on the <code>S3Client</code> instance.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> client </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6; font-weight: bold">new</span><span style="color: #F8F8F2"> Bun.</span><span style="color: #50FA7B">S3Client</span><span style="color: #F8F8F2">({</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> exists </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> client.</span><span style="color: #50FA7B">exists</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">);</span></span> <span class="line"><span style="color: #6272A4">// equivalent to</span></span> <span class="line"><span style="color: #6272A4">// const exists = await client.file(&quot;my-file.txt&quot;).exists();</span></span> <span class="line"></span></code></pre></div><div id="vIxyQCLhqLFU" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#vIxyQCLhqLFU");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`const client = new Bun.S3Client({ accessKeyId: "your-access-key", secretAccessKey: "your-secret-key", bucket: "my-bucket", }); const exists = await client.exists("my-file.txt"); // equivalent to // const exists = await client.file("my-file.txt").exists();`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h2 level="2" anchor-id="s3file" id="s3file" class="anchored "><a name="s3file" class="relative top-[-80px] h-0 invisible block"></a><a href="#s3file" class="no-underline hover:no-underline font-bold hover:none cursor-default"><code>S3File</code></a></h2><p><code>S3File</code> instances are created by calling the <code>S3Client</code> instance method or the <code>s3.file()</code> function. Like <code>Bun.file()</code>, <code>S3File</code> instances are lazy. They don&#x27;t refer to something that necessarily exists at the time of creation. That&#x27;s why all the methods that don&#x27;t involve network requests are fully synchronous.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">interface</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">S3File</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">extends</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Blob</span><span style="color: #F8F8F2"> {</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">slice</span><span style="color: #F8F8F2">(</span><span style="color: #FFB86C; font-style: italic">start</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">number</span><span style="color: #F8F8F2">, </span><span style="color: #FFB86C; font-style: italic">end</span><span style="color: #FF79C6">?:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">number</span><span style="color: #F8F8F2">)</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">S3File</span><span style="color: #F8F8F2">;</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">exists</span><span style="color: #F8F8F2">()</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Promise</span><span style="color: #F8F8F2">&lt;</span><span style="color: #8BE9FD; font-style: italic">boolean</span><span style="color: #F8F8F2">&gt;;</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">unlink</span><span style="color: #F8F8F2">()</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Promise</span><span style="color: #F8F8F2">&lt;</span><span style="color: #8BE9FD; font-style: italic">void</span><span style="color: #F8F8F2">&gt;;</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">presign</span><span style="color: #F8F8F2">(</span><span style="color: #FFB86C; font-style: italic">options</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">S3Options</span><span style="color: #F8F8F2">)</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">string</span><span style="color: #F8F8F2">;</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">text</span><span style="color: #F8F8F2">()</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Promise</span><span style="color: #F8F8F2">&lt;</span><span style="color: #8BE9FD; font-style: italic">string</span><span style="color: #F8F8F2">&gt;;</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">json</span><span style="color: #F8F8F2">()</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Promise</span><span style="color: #F8F8F2">&lt;</span><span style="color: #8BE9FD; font-style: italic">any</span><span style="color: #F8F8F2">&gt;;</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">bytes</span><span style="color: #F8F8F2">()</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Promise</span><span style="color: #F8F8F2">&lt;</span><span style="color: #FFB86C; font-style: italic">Uint8Array</span><span style="color: #F8F8F2">&gt;;</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">arrayBuffer</span><span style="color: #F8F8F2">()</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Promise</span><span style="color: #F8F8F2">&lt;</span><span style="color: #FFB86C; font-style: italic">ArrayBuffer</span><span style="color: #F8F8F2">&gt;;</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">stream</span><span style="color: #F8F8F2">(</span><span style="color: #FFB86C; font-style: italic">options</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">S3Options</span><span style="color: #F8F8F2">)</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">ReadableStream</span><span style="color: #F8F8F2">;</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">write</span><span style="color: #F8F8F2">(</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #FFB86C; font-style: italic">data</span><span style="color: #FF79C6">:</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">|</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">string</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">|</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Uint8Array</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">|</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">ArrayBuffer</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">|</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Blob</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">|</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">ReadableStream</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">|</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Response</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">|</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Request</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #FFB86C; font-style: italic">options</span><span style="color: #FF79C6">?:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">BlobPropertyBag</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> )</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Promise</span><span style="color: #F8F8F2">&lt;</span><span style="color: #8BE9FD; font-style: italic">number</span><span style="color: #F8F8F2">&gt;;</span></span> <span class="line"></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">exists</span><span style="color: #F8F8F2">(</span><span style="color: #FFB86C; font-style: italic">options</span><span style="color: #FF79C6">?:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">S3Options</span><span style="color: #F8F8F2">)</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Promise</span><span style="color: #F8F8F2">&lt;</span><span style="color: #8BE9FD; font-style: italic">boolean</span><span style="color: #F8F8F2">&gt;;</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">unlink</span><span style="color: #F8F8F2">(</span><span style="color: #FFB86C; font-style: italic">options</span><span style="color: #FF79C6">?:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">S3Options</span><span style="color: #F8F8F2">)</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Promise</span><span style="color: #F8F8F2">&lt;</span><span style="color: #8BE9FD; font-style: italic">void</span><span style="color: #F8F8F2">&gt;;</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">delete</span><span style="color: #F8F8F2">(</span><span style="color: #FFB86C; font-style: italic">options</span><span style="color: #FF79C6">?:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">S3Options</span><span style="color: #F8F8F2">)</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Promise</span><span style="color: #F8F8F2">&lt;</span><span style="color: #8BE9FD; font-style: italic">void</span><span style="color: #F8F8F2">&gt;;</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">presign</span><span style="color: #F8F8F2">(</span><span style="color: #FFB86C; font-style: italic">options</span><span style="color: #FF79C6">?:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">S3Options</span><span style="color: #F8F8F2">)</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">string</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">stat</span><span style="color: #F8F8F2">(</span><span style="color: #FFB86C; font-style: italic">options</span><span style="color: #FF79C6">?:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">S3Options</span><span style="color: #F8F8F2">)</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">Promise</span><span style="color: #F8F8F2">&lt;</span><span style="color: #FFB86C; font-style: italic">S3Stat</span><span style="color: #F8F8F2">&gt;;</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">/**</span></span> <span class="line"><span style="color: #6272A4"> * Size is not synchronously available because it requires a network request.</span></span> <span class="line"><span style="color: #6272A4"> *</span></span> <span class="line"><span style="color: #6272A4"> * </span><span style="color: #FF79C6">@deprecated</span><span style="color: #6272A4"> Use `stat()` instead.</span></span> <span class="line"><span style="color: #6272A4"> */</span></span> <span class="line"><span style="color: #F8F8F2"> size</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #8BE9FD; font-style: italic">NaN</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// ... more omitted for brevity</span></span> <span class="line"><span style="color: #F8F8F2">}</span></span> <span class="line"></span></code></pre></div><div id="EuvxgHiADmvw" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#EuvxgHiADmvw");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`interface S3File extends Blob { slice(start: number, end?: number): S3File; exists(): Promise<boolean>; unlink(): Promise<void>; presign(options: S3Options): string; text(): Promise<string>; json(): Promise<any>; bytes(): Promise<Uint8Array>; arrayBuffer(): Promise<ArrayBuffer>; stream(options: S3Options): ReadableStream; write( data: | string | Uint8Array | ArrayBuffer | Blob | ReadableStream | Response | Request, options?: BlobPropertyBag, ): Promise<number>; exists(options?: S3Options): Promise<boolean>; unlink(options?: S3Options): Promise<void>; delete(options?: S3Options): Promise<void>; presign(options?: S3Options): string; stat(options?: S3Options): Promise<S3Stat>; /** * Size is not synchronously available because it requires a network request. * * @deprecated Use \`stat()\` instead. */ size: NaN; // ... more omitted for brevity }`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><p>Like <code>Bun.file()</code>, <code>S3File</code> extends <a href="https://developer.mozilla.org/en-US/docs/Web/API/Blob"><code>Blob</code></a>, so all the methods that are available on <code>Blob</code> are also available on <code>S3File</code>. The same API for reading data from a local file is also available for reading data from S3.</p><div class="TableWrapper"><table><thead><tr><th>Method</th><th>Output</th></tr></thead><tbody><tr><td><code>await s3File.text()</code></td><td><code>string</code></td></tr><tr><td><code>await s3File.bytes()</code></td><td><code>Uint8Array</code></td></tr><tr><td><code>await s3File.json()</code></td><td><code>JSON</code></td></tr><tr><td><code>await s3File.stream()</code></td><td><code>ReadableStream</code></td></tr><tr><td><code>await s3File.arrayBuffer()</code></td><td><code>ArrayBuffer</code></td></tr></tbody></table></div><p>That means using <code>S3File</code> instances with <code>fetch()</code>, <code>Response</code>, and other web APIs that accept <code>Blob</code> instances just works.</p><h3 level="3" anchor-id="partial-reads-with-slice" id="partial-reads-with-slice" class="anchored "><a name="partial-reads-with-slice" class="relative top-[-80px] h-0 invisible block"></a><a href="#partial-reads-with-slice" class="no-underline hover:no-underline font-bold hover:none cursor-default">Partial reads with <code>slice</code></a></h3><p>To read a partial range of a file, you can use the <code>slice</code> method.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> partial </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">slice</span><span style="color: #F8F8F2">(</span><span style="color: #BD93F9">0</span><span style="color: #F8F8F2">, </span><span style="color: #BD93F9">1024</span><span style="color: #F8F8F2">);</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Read the partial range as a Uint8Array</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> bytes </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> partial.</span><span style="color: #50FA7B">bytes</span><span style="color: #F8F8F2">();</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// Read the partial range as a string</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> text </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> partial.</span><span style="color: #50FA7B">text</span><span style="color: #F8F8F2">();</span></span> <span class="line"></span></code></pre></div><div id="NpdwgnfpUWrM" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#NpdwgnfpUWrM");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`const partial = s3file.slice(0, 1024); // Read the partial range as a Uint8Array const bytes = await partial.bytes(); // Read the partial range as a string const text = await partial.text();`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><p>Internally, this works by using the HTTP <code>Range</code> header to request only the bytes you want. This <code>slice</code> method is the same as <a href="https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice"><code>Blob.prototype.slice</code></a>.</p><h3 level="3" anchor-id="deleting-files-from-s3" id="deleting-files-from-s3" class="anchored "><a name="deleting-files-from-s3" class="relative top-[-80px] h-0 invisible block"></a><a href="#deleting-files-from-s3" class="no-underline hover:no-underline font-bold hover:none cursor-default">Deleting files from S3</a></h3><p>To delete a file from S3, you can use the <code>delete</code> method.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">delete</span><span style="color: #F8F8F2">();</span></span> <span class="line"><span style="color: #6272A4">// await s3File.unlink();</span></span> <span class="line"></span></code></pre></div><div id="sgToPbPDIdao" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#sgToPbPDIdao");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`await s3file.delete(); // await s3File.unlink();`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><p><code>delete</code> is the same as <code>unlink</code>.</p><h2 level="2" anchor-id="error-codes" id="error-codes" class="anchored "><a name="error-codes" class="relative top-[-80px] h-0 invisible block"></a><a href="#error-codes" class="no-underline hover:no-underline font-bold hover:none cursor-default">Error codes</a></h2><p>When Bun&#x27;s S3 API throws an error, it will have a <code>code</code> property that matches one of the following values:</p><ul><li class=""><code>ERR_S3_MISSING_CREDENTIALS</code></li><li class=""><code>ERR_S3_INVALID_METHOD</code></li><li class=""><code>ERR_S3_INVALID_PATH</code></li><li class=""><code>ERR_S3_INVALID_ENDPOINT</code></li><li class=""><code>ERR_S3_INVALID_SIGNATURE</code></li><li class=""><code>ERR_S3_INVALID_SESSION_TOKEN</code></li></ul><p>When the S3 Object Storage service returns an error (that is, not Bun), it will be an <code>S3Error</code> instance (an <code>Error</code> instance with the name <code>&quot;S3Error&quot;</code>).</p><h2 level="2" anchor-id="s3client-static-methods" id="s3client-static-methods" class="anchored "><a name="s3client-static-methods" class="relative top-[-80px] h-0 invisible block"></a><a href="#s3client-static-methods" class="no-underline hover:no-underline font-bold hover:none cursor-default"><code>S3Client</code> static methods</a></h2><p>The <code>S3Client</code> class provides several static methods for interacting with S3.</p><h3 level="3" anchor-id="s3client-presign-static" id="s3client-presign-static" class="anchored "><a name="s3client-presign-static" class="relative top-[-80px] h-0 invisible block"></a><a href="#s3client-presign-static" class="no-underline hover:no-underline font-bold hover:none cursor-default"><code>S3Client.presign</code> (static)</a></h3><p>To generate a presigned URL for an S3 file, you can use the <code>S3Client.presign</code> static method.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { S3Client } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> credentials </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> {</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// endpoint: &quot;https://s3.us-east-1.amazonaws.com&quot;,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// endpoint: &quot;https://&lt;account-id&gt;.r2.cloudflarestorage.com&quot;, // Cloudflare R2</span></span> <span class="line"><span style="color: #F8F8F2">};</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> url </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> S3Client.</span><span style="color: #50FA7B">presign</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">, {</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">...</span><span style="color: #F8F8F2">credentials,</span></span> <span class="line"><span style="color: #F8F8F2"> expiresIn</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #BD93F9">3600</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span></code></pre></div><div id="UoxbspmpZrOD" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#UoxbspmpZrOD");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { S3Client } from "bun"; const credentials = { accessKeyId: "your-access-key", secretAccessKey: "your-secret-key", bucket: "my-bucket", // endpoint: "https://s3.us-east-1.amazonaws.com", // endpoint: "https://<account-id>.r2.cloudflarestorage.com", // Cloudflare R2 }; const url = S3Client.presign("my-file.txt", { ...credentials, expiresIn: 3600, });`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><p>This is equivalent to calling <code>new S3Client(credentials).presign(&quot;my-file.txt&quot;, { expiresIn: 3600 })</code>.</p><h3 level="3" anchor-id="s3client-exists-static" id="s3client-exists-static" class="anchored "><a name="s3client-exists-static" class="relative top-[-80px] h-0 invisible block"></a><a href="#s3client-exists-static" class="no-underline hover:no-underline font-bold hover:none cursor-default"><code>S3Client.exists</code> (static)</a></h3><p>To check if an S3 file exists, you can use the <code>S3Client.exists</code> static method.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { S3Client } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> credentials </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> {</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// endpoint: &quot;https://s3.us-east-1.amazonaws.com&quot;,</span></span> <span class="line"><span style="color: #F8F8F2">};</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> exists </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> S3Client.</span><span style="color: #50FA7B">exists</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">, credentials);</span></span> <span class="line"></span></code></pre></div><div id="wpRqhpuLmMJK" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#wpRqhpuLmMJK");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { S3Client } from "bun"; const credentials = { accessKeyId: "your-access-key", secretAccessKey: "your-secret-key", bucket: "my-bucket", // endpoint: "https://s3.us-east-1.amazonaws.com", }; const exists = await S3Client.exists("my-file.txt", credentials);`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><p>The same method also works on <code>S3File</code> instances.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { s3 } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> s3file </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> s3.</span><span style="color: #50FA7B">file</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">, {</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">...</span><span style="color: #F8F8F2">credentials,</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> exists </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> s3file.</span><span style="color: #50FA7B">exists</span><span style="color: #F8F8F2">();</span></span> <span class="line"></span></code></pre></div><div id="QfujkKTpmAmI" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#QfujkKTpmAmI");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { s3 } from "bun"; const s3file = s3.file("my-file.txt", { ...credentials, }); const exists = await s3file.exists();`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="s3client-stat-static" id="s3client-stat-static" class="anchored "><a name="s3client-stat-static" class="relative top-[-80px] h-0 invisible block"></a><a href="#s3client-stat-static" class="no-underline hover:no-underline font-bold hover:none cursor-default"><code>S3Client.stat</code> (static)</a></h3><p>To get the size, etag, and other metadata of an S3 file, you can use the <code>S3Client.stat</code> static method.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { S3Client } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> credentials </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> {</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// endpoint: &quot;https://s3.us-east-1.amazonaws.com&quot;,</span></span> <span class="line"><span style="color: #F8F8F2">};</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> stat </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> S3Client.</span><span style="color: #50FA7B">stat</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">, credentials);</span></span> <span class="line"><span style="color: #6272A4">// {</span></span> <span class="line"><span style="color: #6272A4">// etag: &quot;\&quot;7a30b741503c0b461cc14157e2df4ad8\&quot;&quot;,</span></span> <span class="line"><span style="color: #6272A4">// lastModified: 2025-01-07T00:19:10.000Z,</span></span> <span class="line"><span style="color: #6272A4">// size: 1024,</span></span> <span class="line"><span style="color: #6272A4">// type: &quot;text/plain;charset=utf-8&quot;,</span></span> <span class="line"><span style="color: #6272A4">// }</span></span> <span class="line"></span></code></pre></div><div id="nHcFjDTruEFV" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#nHcFjDTruEFV");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { S3Client } from "bun"; const credentials = { accessKeyId: "your-access-key", secretAccessKey: "your-secret-key", bucket: "my-bucket", // endpoint: "https://s3.us-east-1.amazonaws.com", }; const stat = await S3Client.stat("my-file.txt", credentials); // { // etag: "\\"7a30b741503c0b461cc14157e2df4ad8\\"", // lastModified: 2025-01-07T00:19:10.000Z, // size: 1024, // type: "text/plain;charset=utf-8", // }`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="s3client-delete-static" id="s3client-delete-static" class="anchored "><a name="s3client-delete-static" class="relative top-[-80px] h-0 invisible block"></a><a href="#s3client-delete-static" class="no-underline hover:no-underline font-bold hover:none cursor-default"><code>S3Client.delete</code> (static)</a></h3><p>To delete an S3 file, you can use the <code>S3Client.delete</code> static method.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">import</span><span style="color: #F8F8F2"> { S3Client } </span><span style="color: #FF79C6">from</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bun</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">;</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> credentials </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> {</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> bucket</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-bucket</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #6272A4">// endpoint: &quot;https://s3.us-east-1.amazonaws.com&quot;,</span></span> <span class="line"><span style="color: #F8F8F2">};</span></span> <span class="line"></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> S3Client.</span><span style="color: #50FA7B">delete</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">, credentials);</span></span> <span class="line"><span style="color: #6272A4">// equivalent to</span></span> <span class="line"><span style="color: #6272A4">// await new S3Client(credentials).delete(&quot;my-file.txt&quot;);</span></span> <span class="line"></span> <span class="line"><span style="color: #6272A4">// S3Client.unlink is alias of S3Client.delete</span></span> <span class="line"><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> S3Client.</span><span style="color: #50FA7B">unlink</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">, credentials);</span></span> <span class="line"></span></code></pre></div><div id="bSnwTWAxKFMj" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#bSnwTWAxKFMj");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`import { S3Client } from "bun"; const credentials = { accessKeyId: "your-access-key", secretAccessKey: "your-secret-key", bucket: "my-bucket", // endpoint: "https://s3.us-east-1.amazonaws.com", }; await S3Client.delete("my-file.txt", credentials); // equivalent to // await new S3Client(credentials).delete("my-file.txt"); // S3Client.unlink is alias of S3Client.delete await S3Client.unlink("my-file.txt", credentials);`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h2 level="2" anchor-id="s3-protocol" id="s3-protocol" class="anchored "><a name="s3-protocol" class="relative top-[-80px] h-0 invisible block"></a><a href="#s3-protocol" class="no-underline hover:no-underline font-bold hover:none cursor-default"><code>s3://</code> protocol</a></h2><p>To make it easier to use the same code for local files and S3 files, the <code>s3://</code> protocol is supported in <code>fetch</code> and <code>Bun.file()</code>.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> response </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">fetch</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">s3://my-bucket/my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">);</span></span> <span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> file </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> Bun.</span><span style="color: #50FA7B">file</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">s3://my-bucket/my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">);</span></span> <span class="line"></span></code></pre></div><div id="OlpfzEvpYzjz" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#OlpfzEvpYzjz");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`const response = await fetch("s3://my-bucket/my-file.txt"); const file = Bun.file("s3://my-bucket/my-file.txt");`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><p>You can additionally pass <code>s3</code> options to the <code>fetch</code> and <code>Bun.file</code> functions.</p><div class="CodeBlock "><div class="relative "><div><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #FF79C6">const</span><span style="color: #F8F8F2"> response </span><span style="color: #FF79C6">=</span><span style="color: #F8F8F2"> </span><span style="color: #FF79C6">await</span><span style="color: #F8F8F2"> </span><span style="color: #50FA7B">fetch</span><span style="color: #F8F8F2">(</span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">s3://my-bucket/my-file.txt</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">, {</span></span> <span class="line"><span style="color: #F8F8F2"> s3</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> {</span></span> <span class="line"><span style="color: #F8F8F2"> accessKeyId</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-access-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> secretAccessKey</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">your-secret-key</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> endpoint</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">https://s3.us-east-1.amazonaws.com</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> },</span></span> <span class="line"><span style="color: #F8F8F2"> headers</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> {</span></span> <span class="line"><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">range</span><span style="color: #E9F284">&quot;</span><span style="color: #FF79C6">:</span><span style="color: #F8F8F2"> </span><span style="color: #E9F284">&quot;</span><span style="color: #F1FA8C">bytes=0-1023</span><span style="color: #E9F284">&quot;</span><span style="color: #F8F8F2">,</span></span> <span class="line"><span style="color: #F8F8F2"> },</span></span> <span class="line"><span style="color: #F8F8F2">});</span></span> <span class="line"></span></code></pre></div><div id="wAnTEGccbpcr" class="CopyIcon copy absolute right-[6px] "><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="clipboard h-7 w-7 cursor-pointer p-1 text-white opacity-70 hover:opacity-100 "><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon" class="check hidden h-7 w-7 p-1 text-white "><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg><script>document.addEventListener("DOMContentLoaded",()=>{const clicker=document.querySelector("#wAnTEGccbpcr");clicker.addEventListener("click",(ev)=>{navigator.clipboard.writeText(`const response = await fetch("s3://my-bucket/my-file.txt", { s3: { accessKeyId: "your-access-key", secretAccessKey: "your-secret-key", endpoint: "https://s3.us-east-1.amazonaws.com", }, headers: { "range": "bytes=0-1023", }, });`).then(()=>{clicker.querySelector(".clipboard").classList.add("hidden");clicker.querySelector(".check").classList.remove("hidden");setTimeout(()=>{clicker.querySelector(".clipboard").classList.remove("hidden");clicker.querySelector(".check").classList.add("hidden")},2500)})})});</script></div></div></div><h3 level="3" anchor-id="utf-8-utf-16-and-bom-byte-order-mark" id="utf-8-utf-16-and-bom-byte-order-mark" class="anchored "><a name="utf-8-utf-16-and-bom-byte-order-mark" class="relative top-[-80px] h-0 invisible block"></a><a href="#utf-8-utf-16-and-bom-byte-order-mark" class="no-underline hover:no-underline font-bold hover:none cursor-default">UTF-8, UTF-16, and BOM (byte order mark)</a></h3><p>Like <code>Response</code> and <code>Blob</code>, <code>S3File</code> assumes UTF-8 encoding by default.</p><p>When calling one of the <code>text()</code> or <code>json()</code> methods on an <code>S3File</code>:</p><ul><li class="">When a UTF-16 byte order mark (BOM) is detected, it will be treated as UTF-16. JavaScriptCore natively supports UTF-16, so it skips the UTF-8 transcoding process (and strips the BOM). This is mostly good, but it does mean if you have invalid surrogate pairs characters in your UTF-16 string, they will be passed through to JavaScriptCore (same as source code).</li><li class="">When a UTF-8 BOM is detected, it gets stripped before the string is passed to JavaScriptCore and invalid UTF-8 codepoints are replaced with the Unicode replacement character (<code>\uFFFD</code>).</li><li class="">UTF-32 is not supported.</li></ul></article><div class="h-12"></div></div><div class="ml-auto mr-auto w-full max-w-screen-md px-4"><div class="flex flex-row justify-between gap-2"><a href="/docs/api/sql" class="hover group flex-1 no-underline hover:transform-none hover:no-underline"><div class="button flex items-center justify-between rounded-lg border border-gray-300 px-3 py-3 text-lg no-underline group-hover:border-gray-400 group-hover:bg-gray-100 dark:border-gray-600 dark:group-hover:border-gray-600 dark:group-hover:bg-gray-800 flex-row"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="icon h-6 w-6 text-gray-500 group-hover:text-gray-700 dark:group-hover:text-gray-300"><path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"></path></svg><div class="text-right"><p class="text-xs uppercase text-gray-400 dark:text-gray-500 ">Previous</p><p class="text-gray-700 dark:text-gray-200 ">SQL</p></div></div></a><a href="/docs/api/file-io" class="hover group flex-1 no-underline hover:transform-none hover:no-underline"><div class="button flex items-center justify-between rounded-lg border border-gray-300 px-3 py-3 text-lg no-underline group-hover:border-gray-400 group-hover:bg-gray-100 dark:border-gray-600 dark:group-hover:border-gray-600 dark:group-hover:bg-gray-800 flex-row-reverse"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="icon h-6 w-6 text-gray-500 group-hover:text-gray-700 dark:group-hover:text-gray-300"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"></path></svg><div class="text-left"><p class="text-xs uppercase text-gray-400 dark:text-gray-500 ">Next</p><p class="text-gray-700 dark:text-gray-200 ">File I/O</p></div></div></a></div><div class="h-12"></div><div class="h-0 border-b border-gray-200 dark:border-gray-700"></div><div class="h-6"></div><div class="text-md flex-column flex items-end px-0 text-black"><a class="ml-auto hover:transform-none hover:no-underline" href="https://github.com/oven-sh/bun/edit/main/docs/api/s3.md"><div class="inline-flex cursor-pointer flex-row items-center justify-start rounded-[5px] px-[10px] py-[4px] opacity-80 hover:bg-gray-200 hover:bg-gray-200 hover:opacity-100 dark:text-white dark:hover:bg-gray-800"><img src="data:image/svg+xml;base64, PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOEMwIDExLjU0IDIuMjkgMTQuNTMgNS40NyAxNS41OUM1Ljg3IDE1LjY2IDYuMDIgMTUuNDIgNi4wMiAxNS4yMUM2LjAyIDE1LjAyIDYuMDEgMTQuMzkgNi4wMSAxMy43MkM0IDE0LjA5IDMuNDggMTMuMjMgMy4zMiAxMi43OEMzLjIz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zIDE2IDhDMTYgMy41OCAxMi40MiAwIDggMFoiIHRyYW5zZm9ybT0ic2NhbGUoNjQpIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K" alt="GitHub logo" class="hidden h-[18px] dark:block"/><div class="w-[8px]"></div><p class="text-gray-800 dark:text-gray-300">Edit on GitHub</p></div></a></div></div></div></section><script>const sun=document.querySelectorAll(".sun");const moon=document.querySelectorAll(".moon");sun.forEach((node)=>node.addEventListener("click",()=>{globalThis.__setTheme("light")}));moon.forEach((node)=>node.addEventListener("click",()=>{globalThis.__setTheme("dark")}));</script><script>const scrollPositionKey="scroll-position-"+window.location.pathname;window.addEventListener("beforeunload",()=>{localStorage.setItem(scrollPositionKey,document.querySelector("html").scrollTop)});const oldScrollPosition=localStorage.getItem(scrollPositionKey);if(oldScrollPosition){localStorage.removeItem(scrollPositionKey)}</script><script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script><script type="text/javascript">docsearch({appId:"2527C13E0N",apiKey:"4efc87205e1fce4a1f267cadcab42cb2",indexName:"bun",container:"#docsearchbox"});</script><script type="module" src="/inkeep.min.js" defer=""></script></body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10