Blobs x Blobs

Netlify Blobs provides an object store for any kind of data, be it JSON, binary, or really anything else (really!). In this example, the blob store is used to hold the data of user-generated random blobby shapes.

Using the blob store is basically zero-config. Below is a Next.js Server Action to upload data (see app/blobs/actions.js). When deployed to Netlify, the Server Action is run by serverless functions, and all context required for the blob service is set-up automatically.

'use server';
import { getStore } from '@netlify/blobs';

// TODO: Always be sanitizing data in real sites!
export async function uploadShape({ shapeData }) {
const blobStore = getStore('shapes');
const key = data.name;
await blobStore.setJSON(key, shapeData);
}

Click "Randomize" to get a shape you like, then hit "Upload". Choose any existing object to view it.

New Random Shape
Objects in Blob Store
Please upload some shapes!