What is Berkasna
Berkasna is Sawala Cloud's file and asset storage product — upload images, get a public URL, and serve them from your app.
TODO: translate to Indonesian. English source is authoritative; render it into Indonesian below.
Berkasna is Sawala Cloud's file and asset storage product. You upload a file, Berkasna stores it as an asset, and your app reads it back by URL or through the API.
Each asset can be public — served from a stable URL anyone can fetch — or private — kept behind access controls. Public images are delivered from the berkasna.sawala.cloud host.
When to choose Berkasna
- You need to store images that your website, app, or another service can fetch by URL.
- You want a server-side upload flow where your app never has to proxy the raw file bytes itself.
- You manage media alongside structured content in Kontena and want both backed by the same platform.
Core concepts
- Asset — one file plus its metadata:
id,filename,mimeType,size,status, and (for public files) a computedurl. Optional metadata such astitle,alt, andtagscan be attached. - Presigned upload — a three-step flow: your server requests an upload slot, the file bytes are sent directly to a temporary upload URL, then your server marks the upload complete. Your app server never holds the file bytes.
- Visibility — an asset is either public (gets a
berkasna.sawala.cloudURL) or private (access-controlled). You choose this when requesting the upload slot. - Asset status — a new asset is
pendingwhile bytes are in flight, then becomescompletedonce you mark the upload complete.
Integration with Kontena
Schema fields of type media in Kontena are wired directly to Berkasna, so images and documents you reference in an entry are stored and served by the same platform.
The public API key surface accepts images only. Uploads through the public API are limited to image files (image/png, image/jpeg, image/webp, image/svg+xml, image/gif) and a maximum of 5 MB per file. Larger files and other formats are handled through the dashboard, not the public API.
Limits (public API)
- Accepted types:
image/png,image/jpeg,image/webp,image/svg+xml,image/gif. - Max file size: 5 MB.
- Listing pagination: cursor-based; default 25 per page, max 100.
Upload flow
POST /upload/presigned(secret key) — request an upload slot. You get back anassetId, anr2Key, and a temporaryuploadUrl(valid about 15 minutes).PUTthe raw file bytes to thatuploadUrl— no API key on this request.POST /upload/complete(secret key) with theassetId— mark the upload complete.
To read the public URL afterward, call GET /assets/{id}, which returns the asset including its computed url.
Continue to the first upload tutorial.