/cdn.e-masjid.my

CDN untuk E-Masjid.My

Primary LanguageGo

E-Masjid.My CDN-API Documentation

[ Base URL: https://cdn.e-masjid.my ]

Allowed origins: https://*.e-masjid.my

POST /api/upload

Upload a file to cdn.e-masjid.my

Parameter

body (object)
{
    "mime_type" : "image/jpeg",
    "sub_domain" : "localhost",
    "table_reference" : "tetapan",
    "mark_as_delete" : false,
    "base64_file" : "iVBORw0KGgoAAAANSUhEUgAAAMAA...."
}

File to Base64 reference: https://base64.guru/converter/encode/file

Allowed Mime types

image/gif
image/jpeg
image/png
image/webp
application/pdf

Response

Status Response
201
application/json
{
    "id": 2,
    "path": "https://cdn.e-masjid.my/volume/demo/89a41c2e-da35-4c13-9c4c-2b9a1bb9f980.png",
    "created_at": 65586206
}
403

Forbidden

500

Internal server error