API Documentation

Base URL: https://cdn.sanzxcode.my.id

POST /api/upload

Upload file (multipart/form-data, field: file).

curl -X POST https://cdn.sanzxcode.my.id/api/upload \
  -F "file=@/path/to/file.jpg"
{
  "status": true,
  "filename": "uuid.jpg",
  "originalname": "file.jpg",
  "size": 123456,
  "mimetype": "image/jpeg",
  "url": "https://cdn.sanzxcode.my.id/file/uuid.jpg",
  "expiresAt": "2026-01-01T01:00:00.000Z",
  "expiresInSeconds": 3600
}

GET /file/:filename

Akses file langsung. Mengembalikan 410 Gone dengan halaman expired jika file sudah dihapus.

https://cdn.sanzxcode.my.id/file/uuid.jpg

GET /api/info/:filename

Info metadata file termasuk sisa waktu sebelum dihapus.

https://cdn.sanzxcode.my.id/api/info/uuid.jpg

GET /api/stats

Statistik server (total upload, file aktif, ukuran storage).