27 lines
992 B
TypeScript
27 lines
992 B
TypeScript
import { NextResponse } from 'next/server'
|
|
|
|
export const runtime = 'nodejs'
|
|
export const dynamic = 'force-dynamic'
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// TODO: POST /api/upload/drive
|
|
//
|
|
// Upload files and push them to Google Drive.
|
|
// This route will share the same auth (lib/auth.ts), parsing (lib/parse-upload.ts),
|
|
// and Blender compression (lib/blender.ts) as the git route.
|
|
//
|
|
// Implementation steps:
|
|
// 1. Add `googleapis` package: npm install googleapis
|
|
// 2. Add env vars: GOOGLE_DRIVE_FOLDER_ID, GOOGLE_SERVICE_ACCOUNT_KEY (JSON)
|
|
// 3. Authenticate with Google Drive API using service account
|
|
// 4. Upload files to the target folder (create subfolders as needed)
|
|
// 5. Return the Drive folder URL
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export async function POST() {
|
|
return NextResponse.json(
|
|
{ success: false, error: 'Google Drive upload not implemented yet' },
|
|
{ status: 501 },
|
|
)
|
|
}
|