File Storage
File Storage
provides a static file storage and global delivery network. You can use it to upload static files, and get the CDN url to access them. It works in Deno, Node.js and browsers.
import gokv from "https://deno.land/x/gokv@0.0.23/mod.ts";
const fs = gokv.FileStorage();
const txtFile = new File(["Hello world!"], "hello.txt", { type: "text/plain" });
const { url } = await fs.upload(txtFile); // url -> https://file.gokv.io/xxx-xxx-xxx-xxx
Upload Images
You can upload any images to File Storage
, gokv will optimize those images automatically. Check the images documentation.
Upload Files in Browsers
WIP