UploadThing
Store data using UploadThing.
Note
Learn more about UploadThing.
Warning
UploadThing support is experimental. A deleted key currently cannot be reused; follow the upstream issue for updates.
#Usage
Driver name: uploadthing
Install the uploadthing dependency:
npm i uploadthingimport { createStorage } from "unstorage";
import uploadthingDriver from "unstorage/drivers/uploadthing";
const storage = createStorage({
driver: uploadthingDriver({
// token: "<your token>", // UPLOADTHING_SECRET environment variable will be used if not provided.
}),
});Options:
token: UploadThing API token. When omitted, UploadThing uses its supported environment configuration.base: Optional prefix for all keys.lib: An importeduploadthing/servermodule or a function that returns it.