File Uploader API

Upload file gambar ke Maelyn Files dan dapatkan URL permanen untuk digunakan kembali.

Upload via cURL

Upload file menggunakan multipart/form-data:

curl -F "file=@/path/to/image.jpg" https://files.maelyn.eu/upload

Supported File Types

Format file yang didukung:

  • PNG
  • JPG
  • GIF
  • WEBP
  • SVG

Response Format

Jika upload berhasil, API akan mengembalikan response JSON seperti berikut:

{
  "ok": true,
  "id": "uuid-v4",
  "url": "https://files.maelyn.eu/m/uuid-v4",
  "created_at": "2026-01-30T12:00:00.000Z"
}

Response Field

FieldTypeDescription
okbooleanStatus upload file. Bernilai true jika upload berhasil.
idstringID unik file yang berhasil diupload.
urlstringURL permanen untuk mengakses file.
created_atstringWaktu file dibuat dalam format ISO date.

Example Response

{
  "ok": true,
  "id": "986b2a0a-5c95-4177-9800-02d84a35338e",
  "url": "https://files.maelyn.eu/m/986b2a0a-5c95-4177-9800-02d84a35338e",
  "created_at": "2026-01-30T12:00:00.000Z"
}