Blob Storage: No token found
Unanswered
Goldstripe sardinella posted this in #help-forum
Goldstripe sardinellaOP
Hey guys,
I am working on a recorder-app for a master's thesis and I am struggling to use the vercel blob storage. I want to use the Blob Storage to hold a user's recordings. I am using client side since vercel recommends that for higher file sizes and I expect the recordings to be bigger than 4.5mb
Currently I've not really built out the API and just scaffolded it just to the point where I can test the upload. When the recording should be stored, an error is thrown:
I've assumed that, since the blob storage is in the same project, I do not need to explicitly state the token. However, even manually getting it from the .env file and adding it to the options object, results in the same error.
Some help here would be much appreciated, since the web is still pretty empty surrounding vercel's Blob store 🙂
Here is my current method:
I am working on a recorder-app for a master's thesis and I am struggling to use the vercel blob storage. I want to use the Blob Storage to hold a user's recordings. I am using client side since vercel recommends that for higher file sizes and I expect the recordings to be bigger than 4.5mb
Currently I've not really built out the API and just scaffolded it just to the point where I can test the upload. When the recording should be stored, an error is thrown:
chunk-PCUSB4KF.js:39 Uncaught (in promise) BlobError: Vercel Blob: No token found. Either configure the BLOB_READ_WRITE_TOKEN environment variable, or pass a token option to your calls.I've assumed that, since the blob storage is in the same project, I do not need to explicitly state the token. However, even manually getting it from the .env file and adding it to the options object, results in the same error.
Some help here would be much appreciated, since the web is still pretty empty surrounding vercel's Blob store 🙂
Here is my current method:
'use client'
import { put } from "@vercel/blob";
interface recordingsInterface {
run: number;
blob: Blob;
}
// Store a blob
export const storeRecording = async ({run, blob} : recordingsInterface) => {
const path = `recordings/userXY/${run}.webm`;
const options = {
access: 'public',
contentType: "video/webm",
}
const storedBlob = await put (path, blob, options);
};1 Reply
Sloth bear
@Goldstripe sardinella Did you find a solution to your problem? I got the exact same error and I'm following the guide to the letter.