Skip to main content
POST
Upload one Base64 object
Upload one Base64-encoded file to FiveMesh CDN from a server-side integration. Use this route when the source provides Base64 instead of file bytes, such as a screenshot or mugshot capture. Requires cdn:write.
Keep the service key in a server-side script. Never send it to a FiveM client, NUI bundle or browser.
Idempotency-Key
string
Optional key used to replay the same successful upload response after a retry.
data
string
required
Raw standard Base64 or a Base64 data URL such as data:image/png;base64,.... Padded and unpadded Base64 are accepted.
filename
string
required
Stored filename, including its extension.
contentType
string
File MIME type, such as image/png. When omitted, the API uses the MIME type from a data URL or falls back to application/octet-stream.
path
string
Optional destination folder.
metadata
object
Optional metadata containing string, number or boolean values.

FiveM server example

This example sends raw PNG Base64 from a server-side Lua resource. The API key is read from the server ConVar and never sent to the player.
Base64 increases the request size. Prefer the multipart upload route when you already have file bytes.