Fix blob access mode for public store
The new Vercel Blob store is public, so private access is not allowed. Switch cards read/write to public access. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ export const storageMode = hasBlobToken() ? "Vercel Blob" : "Local file";
|
|||||||
export async function readCards(): Promise<BoardCard[]> {
|
export async function readCards(): Promise<BoardCard[]> {
|
||||||
if (hasBlobToken()) {
|
if (hasBlobToken()) {
|
||||||
try {
|
try {
|
||||||
const result = await get(dataBlobPath, { access: "private" });
|
const result = await get(dataBlobPath, { access: "public" });
|
||||||
if (!result?.stream) {
|
if (!result?.stream) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ export async function writeCards(cards: BoardCard[]) {
|
|||||||
|
|
||||||
if (hasBlobToken()) {
|
if (hasBlobToken()) {
|
||||||
await put(dataBlobPath, content, {
|
await put(dataBlobPath, content, {
|
||||||
access: "private",
|
access: "public",
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
allowOverwrite: true
|
allowOverwrite: true
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user