Image Hosting Vercel

Upload gambar + API Key siap dipakai dari website eksternal

Penting untuk production:
1. Buat Blob Store di Vercel Dashboard → Storage → Blob
2. Tambahkan Environment Variable:
  • BLOB_READ_WRITE_TOKEN (otomatis dari Blob)
  • API_KEYS = key1,key2,key3 (pisah koma)
Saat ini mode demo menerima key: demo-key-change-me

1. Upload Gambar (Web UI)

2. Contoh API (untuk website luar)

curl -X POST https://YOUR-PROJECT.vercel.app/api/upload \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "file=@/path/to/image.jpg"

3. Response Contoh

{
  "success": true,
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "url": "https://xxxxx.public.blob.vercel-storage.com/images/550e....jpg",
  "size": 245760,
  "contentType": "image/jpeg",
  "filename": "foto.jpg"
}