[{"data":1,"prerenderedAt":1217},["ShallowReactive",2],{"navigation":3,"-drivers-cloudflare":137,"-drivers-cloudflare-surround":1212},[4,26],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Getting Started","\u002Fguide","1.guide\u002F1.index",[9,11,16,21],{"title":5,"path":6,"stem":7,"icon":10},"ph:book-open-duotone",{"title":12,"path":13,"stem":14,"icon":15},"Utilities","\u002Fguide\u002Futils","1.guide\u002F2.utils","et:tools-2",{"title":17,"path":18,"stem":19,"icon":20},"HTTP Server","\u002Fguide\u002Fhttp-server","1.guide\u002F3.http-server","ic:baseline-http",{"title":22,"path":23,"stem":24,"icon":25},"Custom Driver","\u002Fguide\u002Fcustom-driver","1.guide\u002F4.custom-driver","carbon:area-custom",{"title":27,"path":28,"stem":29,"children":30,"icon":32},"Drivers","\u002Fdrivers","2.drivers\u002F0.index",[31,33,38,43,48,53,58,63,68,73,77,82,87,92,97,102,107,112,117,122,127,132],{"title":27,"path":28,"stem":29,"icon":32},"icon-park-outline:hard-disk",{"title":34,"path":35,"stem":36,"icon":37},"Azure","\u002Fdrivers\u002Fazure","2.drivers\u002Fazure","mdi:microsoft-azure",{"title":39,"path":40,"stem":41,"icon":42},"Browser","\u002Fdrivers\u002Fbrowser","2.drivers\u002Fbrowser","ph:browser-thin",{"title":44,"path":45,"stem":46,"icon":47},"Capacitor Preferences","\u002Fdrivers\u002Fcapacitor-preferences","2.drivers\u002Fcapacitor-preferences","nonicons:capacitor-16",{"title":49,"path":50,"stem":51,"icon":52},"Cloudflare","\u002Fdrivers\u002Fcloudflare","2.drivers\u002Fcloudflare","devicon-plain:cloudflareworkers",{"title":54,"path":55,"stem":56,"icon":57},"SQL Database","\u002Fdrivers\u002Fdatabase","2.drivers\u002Fdatabase","ph:database",{"title":59,"path":60,"stem":61,"icon":62},"Deno KV","\u002Fdrivers\u002Fdeno","2.drivers\u002Fdeno","simple-icons:deno",{"title":64,"path":65,"stem":66,"icon":67},"Filesystem (Node.js)","\u002Fdrivers\u002Ffs","2.drivers\u002Ffs","ph:file-light",{"title":69,"path":70,"stem":71,"icon":72},"GitHub","\u002Fdrivers\u002Fgithub","2.drivers\u002Fgithub","mdi:github",{"title":74,"path":75,"stem":76,"icon":20},"HTTP","\u002Fdrivers\u002Fhttp","2.drivers\u002Fhttp",{"title":78,"path":79,"stem":80,"icon":81},"LRU Cache","\u002Fdrivers\u002Flru-cache","2.drivers\u002Flru-cache","material-symbols:cached-rounded",{"title":83,"path":84,"stem":85,"icon":86},"Memory","\u002Fdrivers\u002Fmemory","2.drivers\u002Fmemory","bi:memory",{"title":88,"path":89,"stem":90,"icon":91},"MongoDB","\u002Fdrivers\u002Fmongodb","2.drivers\u002Fmongodb","teenyicons:mongodb-outline",{"title":93,"path":94,"stem":95,"icon":96},"Netlify Blobs","\u002Fdrivers\u002Fnetlify","2.drivers\u002Fnetlify","teenyicons:netlify-solid",{"title":98,"path":99,"stem":100,"icon":101},"Null","\u002Fdrivers\u002Fnull","2.drivers\u002Fnull","bi:trash3-fill",{"title":103,"path":104,"stem":105,"icon":106},"Overlay","\u002Fdrivers\u002Foverlay","2.drivers\u002Foverlay","carbon:overlay",{"title":108,"path":109,"stem":110,"icon":111},"PlanetScale","\u002Fdrivers\u002Fplanetscale","2.drivers\u002Fplanetscale","simple-icons:planetscale",{"title":113,"path":114,"stem":115,"icon":116},"Redis","\u002Fdrivers\u002Fredis","2.drivers\u002Fredis","simple-icons:redis",{"title":118,"path":119,"stem":120,"icon":121},"S3","\u002Fdrivers\u002Fs3","2.drivers\u002Fs3","simple-icons:amazons3",{"title":123,"path":124,"stem":125,"icon":126},"UploadThing","\u002Fdrivers\u002Fuploadthing","2.drivers\u002Fuploadthing","qlementine-icons:cloud-16",{"title":128,"path":129,"stem":130,"icon":131},"Upstash","\u002Fdrivers\u002Fupstash","2.drivers\u002Fupstash","simple-icons:upstash",{"title":133,"path":134,"stem":135,"icon":136},"Vercel","\u002Fdrivers\u002Fvercel","2.drivers\u002Fvercel","gg:vercel",{"id":138,"title":49,"body":139,"description":1206,"extension":1207,"meta":1208,"navigation":1209,"path":50,"seo":1210,"stem":51,"__hash__":1211},"content\u002F2.drivers\u002Fcloudflare.md",{"type":140,"value":141,"toc":1194,"icon":52},"minimark",[142,147,154,159,169,176,186,197,411,416,435,438,443,446,452,458,464,472,719,723,799,804,815,820,908,912,917,923,926,932,938,946,1092,1096,1110,1114,1167,1171,1177,1190],[143,144,146],"h2",{"id":145},"cloudflare-kv-binding","CloudFlare KV (binding)",[148,149,150],"blockquote",{},[151,152,153],"p",{},"Store data in Cloudflare KV and access from worker bindings.",[155,156,158],"h3",{"id":157},"usage","Usage",[151,160,161,165,166],{},[162,163,164],"strong",{},"Driver name:"," ",[167,168,145],"code",{},[170,171,173],"read-more",{"to":172},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fruntime-apis\u002Fkv",[151,174,175],{},"Learn more about Cloudflare KV.",[151,177,178,181,182,185],{},[162,179,180],{},"Note:"," This driver only works in a cloudflare worker environment, use ",[167,183,184],{},"cloudflare-kv-http"," for other environments.",[151,187,188,189,196],{},"You need to create and assign a KV. See ",[190,191,195],"a",{"href":192,"rel":193},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fruntime-apis\u002Fkv#kv-bindings",[194],"nofollow","KV Bindings"," for more information.",[198,199,204],"pre",{"className":200,"code":201,"language":202,"meta":203,"style":203},"language-js shiki shiki-themes github-light github-dark github-dark","import { createStorage } from \"unstorage\";\nimport cloudflareKVBindingDriver from \"unstorage\u002Fdrivers\u002Fcloudflare-kv-binding\";\n\n\u002F\u002F Directly setting binding\nconst storage = createStorage({\n  driver: cloudflareKVBindingDriver({ binding: \"STORAGE\" }),\n});\n\n\u002F\u002F Using binding name to be picked from globalThis\nconst storage = createStorage({\n  driver: cloudflareKVBindingDriver({ binding: globalThis.STORAGE }),\n});\n\n\u002F\u002F Using from Durable Objects and Workers using Modules Syntax\nconst storage = createStorage({\n  driver: cloudflareKVBindingDriver({ binding: this.env.STORAGE }),\n});\n\n\u002F\u002F Using outside of Cloudflare Workers (like Node.js)\n\u002F\u002F Use cloudflare-kv-http\n","js","",[167,205,206,229,244,251,258,278,296,302,307,313,326,341,346,351,357,370,389,394,399,405],{"__ignoreMap":203},[207,208,211,215,219,222,226],"span",{"class":209,"line":210},"line",1,[207,212,214],{"class":213},"so5gQ","import",[207,216,218],{"class":217},"slsVL"," { createStorage } ",[207,220,221],{"class":213},"from",[207,223,225],{"class":224},"sfrk1"," \"unstorage\"",[207,227,228],{"class":217},";\n",[207,230,232,234,237,239,242],{"class":209,"line":231},2,[207,233,214],{"class":213},[207,235,236],{"class":217}," cloudflareKVBindingDriver ",[207,238,221],{"class":213},[207,240,241],{"class":224}," \"unstorage\u002Fdrivers\u002Fcloudflare-kv-binding\"",[207,243,228],{"class":217},[207,245,247],{"class":209,"line":246},3,[207,248,250],{"emptyLinePlaceholder":249},true,"\n",[207,252,254],{"class":209,"line":253},4,[207,255,257],{"class":256},"sCsY4","\u002F\u002F Directly setting binding\n",[207,259,261,264,268,271,275],{"class":209,"line":260},5,[207,262,263],{"class":213},"const",[207,265,267],{"class":266},"suiK_"," storage",[207,269,270],{"class":213}," =",[207,272,274],{"class":273},"shcOC"," createStorage",[207,276,277],{"class":217},"({\n",[207,279,281,284,287,290,293],{"class":209,"line":280},6,[207,282,283],{"class":217},"  driver: ",[207,285,286],{"class":273},"cloudflareKVBindingDriver",[207,288,289],{"class":217},"({ binding: ",[207,291,292],{"class":224},"\"STORAGE\"",[207,294,295],{"class":217}," }),\n",[207,297,299],{"class":209,"line":298},7,[207,300,301],{"class":217},"});\n",[207,303,305],{"class":209,"line":304},8,[207,306,250],{"emptyLinePlaceholder":249},[207,308,310],{"class":209,"line":309},9,[207,311,312],{"class":256},"\u002F\u002F Using binding name to be picked from globalThis\n",[207,314,316,318,320,322,324],{"class":209,"line":315},10,[207,317,263],{"class":213},[207,319,267],{"class":266},[207,321,270],{"class":213},[207,323,274],{"class":273},[207,325,277],{"class":217},[207,327,329,331,333,336,339],{"class":209,"line":328},11,[207,330,283],{"class":217},[207,332,286],{"class":273},[207,334,335],{"class":217},"({ binding: globalThis.",[207,337,338],{"class":266},"STORAGE",[207,340,295],{"class":217},[207,342,344],{"class":209,"line":343},12,[207,345,301],{"class":217},[207,347,349],{"class":209,"line":348},13,[207,350,250],{"emptyLinePlaceholder":249},[207,352,354],{"class":209,"line":353},14,[207,355,356],{"class":256},"\u002F\u002F Using from Durable Objects and Workers using Modules Syntax\n",[207,358,360,362,364,366,368],{"class":209,"line":359},15,[207,361,263],{"class":213},[207,363,267],{"class":266},[207,365,270],{"class":213},[207,367,274],{"class":273},[207,369,277],{"class":217},[207,371,373,375,377,379,382,385,387],{"class":209,"line":372},16,[207,374,283],{"class":217},[207,376,286],{"class":273},[207,378,289],{"class":217},[207,380,381],{"class":266},"this",[207,383,384],{"class":217},".env.",[207,386,338],{"class":266},[207,388,295],{"class":217},[207,390,392],{"class":209,"line":391},17,[207,393,301],{"class":217},[207,395,397],{"class":209,"line":396},18,[207,398,250],{"emptyLinePlaceholder":249},[207,400,402],{"class":209,"line":401},19,[207,403,404],{"class":256},"\u002F\u002F Using outside of Cloudflare Workers (like Node.js)\n",[207,406,408],{"class":209,"line":407},20,[207,409,410],{"class":256},"\u002F\u002F Use cloudflare-kv-http\n",[151,412,413],{},[162,414,415],{},"Options:",[417,418,419,429],"ul",{},[420,421,422,425,426,428],"li",{},[167,423,424],{},"binding",": KV binding or name of namespace. Default is ",[167,427,338],{},".",[420,430,431,434],{},[167,432,433],{},"base",": Adds prefix to all stored keys",[143,436,437],{"id":184},"Cloudflare KV (http)",[148,439,440],{},[151,441,442],{},"Store data in Cloudflare KV using the Cloudflare API v4.",[155,444,158],{"id":445},"usage-1",[151,447,448,165,450],{},[162,449,164],{},[167,451,184],{},[170,453,455],{"to":454},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fapi\u002Foperations\u002Fworkers-kv-namespace-list-namespaces",[151,456,457],{},"Learn more about Cloudflare KV API.",[151,459,460,461,196],{},"You need to create a KV namespace. See ",[190,462,195],{"href":192,"rel":463},[194],[151,465,466,468,469,471],{},[162,467,180],{}," This driver uses native fetch and works universally! For a direct usage in a cloudflare worker environment, please use ",[167,470,145],{}," driver for best performance!",[198,473,475],{"className":200,"code":474,"language":202,"meta":203,"style":203},"import { createStorage } from \"unstorage\";\nimport cloudflareKVHTTPDriver from \"unstorage\u002Fdrivers\u002Fcloudflare-kv-http\";\n\n\u002F\u002F Using `apiToken`\nconst storage = createStorage({\n  driver: cloudflareKVHTTPDriver({\n    accountId: \"my-account-id\",\n    namespaceId: \"my-kv-namespace-id\",\n    apiToken: \"supersecret-api-token\",\n  }),\n});\n\n\u002F\u002F Using `email` and `apiKey`\nconst storage = createStorage({\n  driver: cloudflareKVHTTPDriver({\n    accountId: \"my-account-id\",\n    namespaceId: \"my-kv-namespace-id\",\n    email: \"me@example.com\",\n    apiKey: \"my-api-key\",\n  }),\n});\n\n\u002F\u002F Using `userServiceKey`\nconst storage = createStorage({\n  driver: cloudflareKVHTTPDriver({\n    accountId: \"my-account-id\",\n    namespaceId: \"my-kv-namespace-id\",\n    userServiceKey: \"v1.0-my-service-key\",\n  }),\n});\n",[167,476,477,489,503,507,512,524,533,544,554,564,569,573,577,582,594,602,610,618,628,638,642,647,652,658,671,680,689,698,709,714],{"__ignoreMap":203},[207,478,479,481,483,485,487],{"class":209,"line":210},[207,480,214],{"class":213},[207,482,218],{"class":217},[207,484,221],{"class":213},[207,486,225],{"class":224},[207,488,228],{"class":217},[207,490,491,493,496,498,501],{"class":209,"line":231},[207,492,214],{"class":213},[207,494,495],{"class":217}," cloudflareKVHTTPDriver ",[207,497,221],{"class":213},[207,499,500],{"class":224}," \"unstorage\u002Fdrivers\u002Fcloudflare-kv-http\"",[207,502,228],{"class":217},[207,504,505],{"class":209,"line":246},[207,506,250],{"emptyLinePlaceholder":249},[207,508,509],{"class":209,"line":253},[207,510,511],{"class":256},"\u002F\u002F Using `apiToken`\n",[207,513,514,516,518,520,522],{"class":209,"line":260},[207,515,263],{"class":213},[207,517,267],{"class":266},[207,519,270],{"class":213},[207,521,274],{"class":273},[207,523,277],{"class":217},[207,525,526,528,531],{"class":209,"line":280},[207,527,283],{"class":217},[207,529,530],{"class":273},"cloudflareKVHTTPDriver",[207,532,277],{"class":217},[207,534,535,538,541],{"class":209,"line":298},[207,536,537],{"class":217},"    accountId: ",[207,539,540],{"class":224},"\"my-account-id\"",[207,542,543],{"class":217},",\n",[207,545,546,549,552],{"class":209,"line":304},[207,547,548],{"class":217},"    namespaceId: ",[207,550,551],{"class":224},"\"my-kv-namespace-id\"",[207,553,543],{"class":217},[207,555,556,559,562],{"class":209,"line":309},[207,557,558],{"class":217},"    apiToken: ",[207,560,561],{"class":224},"\"supersecret-api-token\"",[207,563,543],{"class":217},[207,565,566],{"class":209,"line":315},[207,567,568],{"class":217},"  }),\n",[207,570,571],{"class":209,"line":328},[207,572,301],{"class":217},[207,574,575],{"class":209,"line":343},[207,576,250],{"emptyLinePlaceholder":249},[207,578,579],{"class":209,"line":348},[207,580,581],{"class":256},"\u002F\u002F Using `email` and `apiKey`\n",[207,583,584,586,588,590,592],{"class":209,"line":353},[207,585,263],{"class":213},[207,587,267],{"class":266},[207,589,270],{"class":213},[207,591,274],{"class":273},[207,593,277],{"class":217},[207,595,596,598,600],{"class":209,"line":359},[207,597,283],{"class":217},[207,599,530],{"class":273},[207,601,277],{"class":217},[207,603,604,606,608],{"class":209,"line":372},[207,605,537],{"class":217},[207,607,540],{"class":224},[207,609,543],{"class":217},[207,611,612,614,616],{"class":209,"line":391},[207,613,548],{"class":217},[207,615,551],{"class":224},[207,617,543],{"class":217},[207,619,620,623,626],{"class":209,"line":396},[207,621,622],{"class":217},"    email: ",[207,624,625],{"class":224},"\"me@example.com\"",[207,627,543],{"class":217},[207,629,630,633,636],{"class":209,"line":401},[207,631,632],{"class":217},"    apiKey: ",[207,634,635],{"class":224},"\"my-api-key\"",[207,637,543],{"class":217},[207,639,640],{"class":209,"line":407},[207,641,568],{"class":217},[207,643,645],{"class":209,"line":644},21,[207,646,301],{"class":217},[207,648,650],{"class":209,"line":649},22,[207,651,250],{"emptyLinePlaceholder":249},[207,653,655],{"class":209,"line":654},23,[207,656,657],{"class":256},"\u002F\u002F Using `userServiceKey`\n",[207,659,661,663,665,667,669],{"class":209,"line":660},24,[207,662,263],{"class":213},[207,664,267],{"class":266},[207,666,270],{"class":213},[207,668,274],{"class":273},[207,670,277],{"class":217},[207,672,674,676,678],{"class":209,"line":673},25,[207,675,283],{"class":217},[207,677,530],{"class":273},[207,679,277],{"class":217},[207,681,683,685,687],{"class":209,"line":682},26,[207,684,537],{"class":217},[207,686,540],{"class":224},[207,688,543],{"class":217},[207,690,692,694,696],{"class":209,"line":691},27,[207,693,548],{"class":217},[207,695,551],{"class":224},[207,697,543],{"class":217},[207,699,701,704,707],{"class":209,"line":700},28,[207,702,703],{"class":217},"    userServiceKey: ",[207,705,706],{"class":224},"\"v1.0-my-service-key\"",[207,708,543],{"class":217},[207,710,712],{"class":209,"line":711},29,[207,713,568],{"class":217},[207,715,717],{"class":209,"line":716},30,[207,718,301],{"class":217},[151,720,721],{},[162,722,415],{},[417,724,725,731,740,751,763,772,786,795],{},[420,726,727,730],{},[167,728,729],{},"accountId",": Cloudflare account ID.",[420,732,733,736,737,739],{},[167,734,735],{},"namespaceId",": The ID of the KV namespace to target. ",[162,738,180],{}," be sure to use the namespace's ID, and not the name or binding used in a worker environment.",[420,741,742,745,746,428],{},[167,743,744],{},"apiToken",": API Token generated from the ",[190,747,750],{"href":748,"rel":749},"https:\u002F\u002Fdash.cloudflare.com\u002Fprofile\u002Fapi-tokens",[194],"User Profile 'API Tokens' page",[420,752,753,756,757,760,761,428],{},[167,754,755],{},"email",": Email address associated with your account. May be used along with ",[167,758,759],{},"apiKey"," to authenticate in place of ",[167,762,744],{},[420,764,765,767,768,760,770,428],{},[167,766,759],{},": API key generated on the \"My Account\" page of the Cloudflare console. May be used along with ",[167,769,755],{},[167,771,744],{},[420,773,774,777,778,780,781,783,784,428],{},[167,775,776],{},"userServiceKey",": A special Cloudflare API key good for a restricted set of endpoints. Always begins with \"v1.0-\", may vary in length. May be used to authenticate in place of ",[167,779,744],{}," or ",[167,782,759],{}," and ",[167,785,755],{},[420,787,788,791,792,428],{},[167,789,790],{},"apiURL",": Custom API URL. Default is ",[167,793,794],{},"https:\u002F\u002Fapi.cloudflare.com",[420,796,797,434],{},[167,798,433],{},[151,800,801],{},[162,802,803],{},"Transaction options:",[417,805,806],{},[420,807,808,811,812],{},[167,809,810],{},"ttl",": Supported for ",[167,813,814],{},"setItem(key, value, { ttl: number \u002F* seconds min 60 *\u002F })",[151,816,817],{},[162,818,819],{},"Supported methods:",[417,821,822,836,857,870,883,896],{},[420,823,824,827,828,165,833],{},[167,825,826],{},"getItem",": Maps to ",[190,829,832],{"href":830,"rel":831},"https:\u002F\u002Fapi.cloudflare.com\u002F#workers-kv-namespace-read-key-value-pair",[194],"Read key-value pair",[167,834,835],{},"GET accounts\u002F:account_identifier\u002Fstorage\u002Fkv\u002Fnamespaces\u002F:namespace_identifier\u002Fvalues\u002F:key_name",[420,837,838,827,841,165,844,846,847,850,851,854,855,428],{},[167,839,840],{},"hasItem",[190,842,832],{"href":830,"rel":843},[194],[167,845,835],{},". Returns ",[167,848,849],{},"true"," if ",[167,852,853],{},"\u003Cparsed response body>.success"," is ",[167,856,849],{},[420,858,859,827,862,165,867],{},[167,860,861],{},"setItem",[190,863,866],{"href":864,"rel":865},"https:\u002F\u002Fapi.cloudflare.com\u002F#workers-kv-namespace-write-key-value-pair",[194],"Write key-value pair",[167,868,869],{},"PUT accounts\u002F:account_identifier\u002Fstorage\u002Fkv\u002Fnamespaces\u002F:namespace_identifier\u002Fvalues\u002F:key_name",[420,871,872,827,875,165,880],{},[167,873,874],{},"removeItem",[190,876,879],{"href":877,"rel":878},"https:\u002F\u002Fapi.cloudflare.com\u002F#workers-kv-namespace-delete-key-value-pair",[194],"Delete key-value pair",[167,881,882],{},"DELETE accounts\u002F:account_identifier\u002Fstorage\u002Fkv\u002Fnamespaces\u002F:namespace_identifier\u002Fvalues\u002F:key_name",[420,884,885,827,888,165,893],{},[167,886,887],{},"getKeys",[190,889,892],{"href":890,"rel":891},"https:\u002F\u002Fapi.cloudflare.com\u002F#workers-kv-namespace-list-a-namespace-s-keys",[194],"List a Namespace's Keys",[167,894,895],{},"GET accounts\u002F:account_identifier\u002Fstorage\u002Fkv\u002Fnamespaces\u002F:namespace_identifier\u002Fkeys",[420,897,898,827,901,165,905],{},[167,899,900],{},"clear",[190,902,879],{"href":903,"rel":904},"https:\u002F\u002Fapi.cloudflare.com\u002F#workers-kv-namespace-delete-multiple-key-value-pairs",[194],[167,906,907],{},"DELETE accounts\u002F:account_identifier\u002Fstorage\u002Fkv\u002Fnamespaces\u002F:namespace_identifier\u002Fbulk",[143,909,911],{"id":910},"cloudflare-r2-binding","CloudFlare R2 (binding)",[148,913,914],{},[151,915,916],{},"Store data in Cloudflare R2 buckets and access from worker bindings.",[918,919,920],"warning",{},[151,921,922],{},"This is an experimental driver! This driver only works in a cloudflare worker environment and cannot be used in other runtime environments such as Node.js (r2-http driver is coming soon)",[155,924,158],{"id":925},"usage-2",[151,927,928,165,930],{},[162,929,164],{},[167,931,910],{},[170,933,935],{"to":934},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fr2\u002Fapi\u002Fworkers\u002Fworkers-api-reference\u002F",[151,936,937],{},"Learn more about Cloudflare R2 buckets.",[151,939,940,941,196],{},"You need to create and assign a R2 bucket. See ",[190,942,945],{"href":943,"rel":944},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fr2\u002Fapi\u002Fworkers\u002Fworkers-api-reference\u002F#create-a-binding",[194],"R2 Bindings",[198,947,949],{"className":200,"code":948,"language":202,"meta":203,"style":203},"import { createStorage } from \"unstorage\";\nimport cloudflareR2BindingDriver from \"unstorage\u002Fdrivers\u002Fcloudflare-r2-binding\";\n\n\u002F\u002F Using binding name to be picked from globalThis\nconst storage = createStorage({\n  driver: cloudflareR2BindingDriver({ binding: \"BUCKET\" }),\n});\n\n\u002F\u002F Directly setting binding\nconst storage = createStorage({\n  driver: cloudflareR2BindingDriver({ binding: globalThis.BUCKET }),\n});\n\n\u002F\u002F Using from Durable Objects and Workers using Modules Syntax\nconst storage = createStorage({\n  driver: cloudflareR2BindingDriver({ binding: this.env.BUCKET }),\n});\n",[167,950,951,963,977,981,985,997,1011,1015,1019,1023,1035,1048,1052,1056,1060,1072,1088],{"__ignoreMap":203},[207,952,953,955,957,959,961],{"class":209,"line":210},[207,954,214],{"class":213},[207,956,218],{"class":217},[207,958,221],{"class":213},[207,960,225],{"class":224},[207,962,228],{"class":217},[207,964,965,967,970,972,975],{"class":209,"line":231},[207,966,214],{"class":213},[207,968,969],{"class":217}," cloudflareR2BindingDriver ",[207,971,221],{"class":213},[207,973,974],{"class":224}," \"unstorage\u002Fdrivers\u002Fcloudflare-r2-binding\"",[207,976,228],{"class":217},[207,978,979],{"class":209,"line":246},[207,980,250],{"emptyLinePlaceholder":249},[207,982,983],{"class":209,"line":253},[207,984,312],{"class":256},[207,986,987,989,991,993,995],{"class":209,"line":260},[207,988,263],{"class":213},[207,990,267],{"class":266},[207,992,270],{"class":213},[207,994,274],{"class":273},[207,996,277],{"class":217},[207,998,999,1001,1004,1006,1009],{"class":209,"line":280},[207,1000,283],{"class":217},[207,1002,1003],{"class":273},"cloudflareR2BindingDriver",[207,1005,289],{"class":217},[207,1007,1008],{"class":224},"\"BUCKET\"",[207,1010,295],{"class":217},[207,1012,1013],{"class":209,"line":298},[207,1014,301],{"class":217},[207,1016,1017],{"class":209,"line":304},[207,1018,250],{"emptyLinePlaceholder":249},[207,1020,1021],{"class":209,"line":309},[207,1022,257],{"class":256},[207,1024,1025,1027,1029,1031,1033],{"class":209,"line":315},[207,1026,263],{"class":213},[207,1028,267],{"class":266},[207,1030,270],{"class":213},[207,1032,274],{"class":273},[207,1034,277],{"class":217},[207,1036,1037,1039,1041,1043,1046],{"class":209,"line":328},[207,1038,283],{"class":217},[207,1040,1003],{"class":273},[207,1042,335],{"class":217},[207,1044,1045],{"class":266},"BUCKET",[207,1047,295],{"class":217},[207,1049,1050],{"class":209,"line":343},[207,1051,301],{"class":217},[207,1053,1054],{"class":209,"line":348},[207,1055,250],{"emptyLinePlaceholder":249},[207,1057,1058],{"class":209,"line":353},[207,1059,356],{"class":256},[207,1061,1062,1064,1066,1068,1070],{"class":209,"line":359},[207,1063,263],{"class":213},[207,1065,267],{"class":266},[207,1067,270],{"class":213},[207,1069,274],{"class":273},[207,1071,277],{"class":217},[207,1073,1074,1076,1078,1080,1082,1084,1086],{"class":209,"line":372},[207,1075,283],{"class":217},[207,1077,1003],{"class":273},[207,1079,289],{"class":217},[207,1081,381],{"class":266},[207,1083,384],{"class":217},[207,1085,1045],{"class":266},[207,1087,295],{"class":217},[207,1089,1090],{"class":209,"line":391},[207,1091,301],{"class":217},[151,1093,1094],{},[162,1095,415],{},[417,1097,1098,1105],{},[420,1099,1100,1102,1103,428],{},[167,1101,424],{},": Bucket binding or name. Default is ",[167,1104,1045],{},[420,1106,1107,1109],{},[167,1108,433],{},": Prefix all keys with base.",[151,1111,1112],{},[162,1113,803],{},[417,1115,1116],{},[420,1117,1118,1121],{},[167,1119,1120],{},"getItemRaw(key, { type: \"...\" })",[417,1122,1123,1134,1140,1149,1158],{},[420,1124,1125,1128,1129,428],{},[167,1126,1127],{},"type: \"object\"",": Return the ",[190,1130,1133],{"href":1131,"rel":1132},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fr2\u002Fapi\u002Fworkers\u002Fworkers-api-reference\u002F#r2objectbody-definition",[194],"R2 object body",[420,1135,1136,1139],{},[167,1137,1138],{},"type: \"stream\"",": Return body stream.",[420,1141,1142,1145,1146,428],{},[167,1143,1144],{},"type: \"blob\"",": Return a ",[167,1147,1148],{},"Blob",[420,1150,1151,1154,1155,428],{},[167,1152,1153],{},"type: \"bytes\"",": Return an ",[167,1156,1157],{},"Uint8Array",[420,1159,1160,1154,1163,1166],{},[167,1161,1162],{},"type: \"arrayBuffer\"",[167,1164,1165],{},"ArrayBuffer"," (default)",[143,1168,1170],{"id":1169},"cloudflare-r2-http","Cloudflare R2 (http)",[151,1172,1173,1174,428],{},"To use Cloudflare R2 over HTTP, you can use ",[190,1175,1176],{"href":119},"s3 driver",[1178,1179,1180],"note",{},[151,1181,1182,1183,1186,1187],{},"\nMake sure to set ",[167,1184,1185],{},"region"," to ",[167,1188,1189],{},"auto",[1191,1192,1193],"style",{},"html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":203,"searchDepth":231,"depth":231,"links":1195},[1196,1199,1202,1205],{"id":145,"depth":231,"text":146,"children":1197},[1198],{"id":157,"depth":246,"text":158},{"id":184,"depth":231,"text":437,"children":1200},[1201],{"id":445,"depth":246,"text":158},{"id":910,"depth":231,"text":911,"children":1203},[1204],{"id":925,"depth":246,"text":158},{"id":1169,"depth":231,"text":1170},"Store data in Cloudflare KV or R2 storage.","md",{"icon":52},{"icon":52},{"title":49,"description":1206},"o3q3XpK20YjwrcoiybUzivyc4isW4Ra9Bih4vChLYh8",[1213,1215],{"title":44,"path":45,"stem":46,"description":1214,"icon":47,"children":-1},"Store data via Capacitor Preferences API on mobile devices or local storage on the web.",{"title":54,"path":55,"stem":56,"description":1216,"icon":57,"children":-1},"Store data in any SQL database.",1781217588455]