import { NextResponse } from "next/server"

export async function GET() {
  try {
    const token = process.env.BLOB_READ_WRITE_TOKEN

    if (!token) {
      return NextResponse.json({ error: "Blob token not configured" }, { status: 500 })
    }

    return NextResponse.json({ token })
  } catch (error) {
    console.error("[v0] Token generation error:", error)
    return NextResponse.json({ error: "Failed to get upload token" }, { status: 500 })
  }
}
