Global Key-Value Store.beta

File Storage

gokv provides a static file storage and global content delivery network (CDN). You can use it to upload static files or images, and get the optimized global CDN url. It works in Deno, Node.js and browsers.

import gokv from "";

// get the file storage
const fs = gokv.FileStorage();

// for pro users, you can use namespace to separate your data
const fs = gokv.FileStorage({ namespace: "xxx" });

// upload a file
const file = new File(["Hello world!"], "hello.txt", { type: "text/plain" });
const { url } = await fs.upload(file); // url ->

Upload Images

You can upload images to the file storage, gokv will optimize those images automatically. More details please check the images documentation.

import gokv from "";

const fs = gokv.FileStorage();
const image = new File(
  [await Deno.readFile("./image.png")],
  { type: "image/png" },
const { url } = await fs.upload(image); // url ->