Skip to content
Get Started

Store

client.blobs.store(stringkey, BlobStoreParams { blob } params, RequestOptionsoptions?): BlobStoreResponse { }
post/v1/blob/{key}

Store data in blob storage

ParametersExpand Collapse
key: string
params: BlobStoreParams { blob }

Binary input data

formatbinary
ReturnsExpand Collapse
BlobStoreResponse = "ok"
Store
import ValTown from "npm:@valtown/sdk";

const client = new ValTown({
  bearerToken: process.env['VAL_TOWN_API_KEY'], // This is the default and can be omitted
});

const response = await client.blobs.store('x', { blob: fs.createReadStream('path/to/file') });

console.log(response);
"ok"
Returns Examples
"ok"