Skip to content

Commit 0758fa1

Browse files
committed
Vercel template: Require public store
1 parent 0fbf593 commit 0758fa1

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

packages/template-vercel/create-snapshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const snapshot = await sandbox.snapshot({ expiration: 0 });
2121
const { snapshotId } = snapshot;
2222

2323
await put(getSnapshotBlobKey(), JSON.stringify({ snapshotId }), {
24-
access: "private",
24+
access: "public",
2525
contentType: "application/json",
2626
addRandomSuffix: false,
2727
});

packages/template-vercel/src/app/api/render/restore-snapshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const getSnapshotBlobKey = () =>
88

99
export async function restoreSnapshot() {
1010
const blob = await get(getSnapshotBlobKey(), {
11-
access: "private",
11+
access: "public",
1212
token: process.env.BLOB_READ_WRITE_TOKEN,
1313
});
1414
if (!blob) {

packages/template-vercel/src/app/api/render/route.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import {
77
import { waitUntil } from "@vercel/functions";
88
import { COMP_NAME } from "../../../../types/constants";
99
import { RenderRequest } from "../../../../types/schema";
10-
import { bundleRemotionProject, formatSSE, type RenderProgress } from "./helpers";
10+
import {
11+
bundleRemotionProject,
12+
formatSSE,
13+
type RenderProgress,
14+
} from "./helpers";
1115
import { restoreSnapshot } from "./restore-snapshot";
1216

1317
export async function POST(req: Request) {

0 commit comments

Comments
 (0)