Skip to content

🎥 Make videos programmatically with React

`@remotion/vercel`: Upgrade @vercel/blob to 2.3.0 and add private upload support

Jonny Burger3d3f775d0e25
diff --git a/bun.lock b/bun.lock
index 8cfd30c2ce..69bed11623 100644
--- a/bun.lock
+++ b/bun.lock
@@ -2184,7 +2184,7 @@
"@remotion/tailwind-v4": "workspace:*",
"@remotion/vercel": "workspace:*",
"@types/bun": "1.3.3",
- "@vercel/blob": "2.0.1",
+ "@vercel/blob": "2.3.0",
"@vercel/functions": "^3.4.1",
"@vercel/sandbox": "1.6.0",
"clsx": "2.1.1",
@@ -2293,7 +2293,7 @@
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
"@typescript/native-preview": "catalog:",
- "@vercel/blob": "2.0.1",
+ "@vercel/blob": "2.3.0",
"@vercel/sandbox": "1.6.0",
"eslint": "catalog:",
},
@@ -4682,7 +4682,7 @@
"@vanilla-extract/private": ["@vanilla-extract/[email protected]", "", {}, "sha512-ytsG/JLweEjw7DBuZ/0JCN4WAQgM9erfSTdS1NQY778hFQSZ6cfCDEZZ0sgVm4k54uNz6ImKB33AYvSR//fjxw=="],
- "@vercel/blob": ["@vercel/[email protected]", "", { "dependencies": { "async-retry": "^1.3.3", "is-buffer": "^2.0.5", "is-node-process": "^1.2.0", "throttleit": "^2.1.0", "undici": "^6.23.0" } }, "sha512-DeJmC/B5oH1ExazYh/UvjbN6Mg0q0wlDz29GPIPNhi4COjVzqYRkyPYjOcAZd+RgXVzWqGXholZWtGcLCPuL8A=="],
+ "@vercel/blob": ["@vercel/[email protected]", "", { "dependencies": { "async-retry": "^1.3.3", "is-buffer": "^2.0.5", "is-node-process": "^1.2.0", "throttleit": "^2.1.0", "undici": "^6.23.0" } }, "sha512-oYWiJbWRQ7gz9Mj0X/NHFJ3OcLMOBzq/2b3j6zeNrQmtFo6dHwU8FAwNpxVIYddVMd+g8eqEi7iRueYx8FtM0Q=="],
"@vercel/config": ["@vercel/[email protected]", "", { "dependencies": { "pretty-cache-header": "^1.0.0", "zod": "^3.22.0" }, "bin": { "config": "dist/cli.js" } }, "sha512-lGnGmac05Rt+dYNwn6Rfub5GCnhSS33f3oQ3+1SSWw7zaI1gCaBDVetGtAIM5cMGG6UkGcRRSp1sw0dibS5wUQ=="],
diff --git a/packages/docs/docs/vercel/types.mdx b/packages/docs/docs/vercel/types.mdx
index cff9553b35..04bf1ce89e 100644
--- a/packages/docs/docs/vercel/types.mdx
+++ b/packages/docs/docs/vercel/types.mdx
@@ -72,4 +72,4 @@ import type {VercelBlobAccess} from '@remotion/vercel';
// ^?
```
-Currently only `"public"`. Used as the `access` parameter for [`uploadToVercelBlob()`](/docs/vercel/upload-to-vercel-blob).
+Either `"public"` or `"private"`. Used as the `access` parameter for [`uploadToVercelBlob()`](/docs/vercel/upload-to-vercel-blob).
diff --git a/packages/docs/docs/vercel/upload-to-vercel-blob.mdx b/packages/docs/docs/vercel/upload-to-vercel-blob.mdx
index 5b3aae7113..70571ff3fd 100644
--- a/packages/docs/docs/vercel/upload-to-vercel-blob.mdx
+++ b/packages/docs/docs/vercel/upload-to-vercel-blob.mdx
@@ -56,11 +56,11 @@ The MIME type of the file, e.g. `"video/mp4"` or `"image/png"`.
Your Vercel Blob read/write token. Typically `process.env.BLOB_READ_WRITE_TOKEN`.
-### `access`
+### `access?`
<TsType type="VercelBlobAccess" source="@remotion/vercel" href="/docs/vercel/types#vercelblobaccess" />
-The access level of the uploaded blob. Default: `"public"`.
+The access level of the uploaded blob. Either `"public"` or `"private"`. Default: `"private"`.
## Return value
diff --git a/packages/template-vercel/package.json b/packages/template-vercel/package.json
index a1a438fa74..81c4cda466 100644
--- a/packages/template-vercel/package.json
+++ b/packages/template-vercel/package.json
@@ -20,7 +20,7 @@
"@remotion/tailwind-v4": "workspace:*",
"@remotion/vercel": "workspace:*",
"@types/bun": "1.3.3",
- "@vercel/blob": "2.0.1",
+ "@vercel/blob": "2.3.0",
"@vercel/functions": "^3.4.1",
"@vercel/sandbox": "1.6.0",
"clsx": "2.1.1",
diff --git a/packages/vercel/package.json b/packages/vercel/package.json
index 394d42e669..dfa00afe6e 100644
--- a/packages/vercel/package.json
+++ b/packages/vercel/package.json
@@ -39,7 +39,7 @@
},
"devDependencies": {
"@remotion/eslint-config-internal": "workspace:*",
- "@vercel/blob": "2.0.1",
+ "@vercel/blob": "2.3.0",
"@vercel/sandbox": "1.6.0",
"eslint": "catalog:",
"@typescript/native-preview": "catalog:"
diff --git a/packages/vercel/src/scripts/upload-blob.ts b/packages/vercel/src/scripts/upload-blob.ts
index d08d80ab38..8f6c38fe17 100644
--- a/packages/vercel/src/scripts/upload-blob.ts
+++ b/packages/vercel/src/scripts/upload-blob.ts
@@ -1,12 +1,13 @@
import {put} from '@vercel/blob';
import {readFileSync, statSync} from 'fs';
+import type {VercelBlobAccess} from '../types';
type UploadBlobConfig = {
sandboxFilePath: string;
blobPath: string;
contentType: string;
blobToken: string;
- access: 'public';
+ access: VercelBlobAccess;
};
const config: UploadBlobConfig = JSON.parse(process.argv[2]);
diff --git a/packages/vercel/src/types.ts b/packages/vercel/src/types.ts
index 3716138124..b915ea372a 100644
--- a/packages/vercel/src/types.ts
+++ b/packages/vercel/src/types.ts
@@ -46,7 +46,7 @@ export type {
ProResProfile,
} from '@remotion/renderer/client';
-export type VercelBlobAccess = 'public';
+export type VercelBlobAccess = 'public' | 'private';
export type SandboxRenderMediaMessage =
| {stage: 'opening-browser'; overallProgress: number}
diff --git a/packages/vercel/src/upload-to-vercel-blob.ts b/packages/vercel/src/upload-to-vercel-blob.ts
index b3ca1c651b..d151484abf 100644
--- a/packages/vercel/src/upload-to-vercel-blob.ts
+++ b/packages/vercel/src/upload-to-vercel-blob.ts
@@ -23,7 +23,7 @@ export async function uploadToVercelBlob({
blobPath?: string;
contentType: string;
blobToken: string;
- access: VercelBlobAccess;
+ access?: VercelBlobAccess;
}): Promise<{url: string; size: number}> {
const actualBlobPath =
blobPath ??
@@ -34,7 +34,7 @@ export async function uploadToVercelBlob({
blobPath: actualBlobPath,
contentType,
blobToken,
- access,
+ access: access ?? 'private',
};
const uploadCmd = await sandbox.runCommand({