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 API key in a server-side script. Never send it to a FiveM client,
NUI bundle or browser.
string
Optional key used to replay the same successful upload response after a retry.
string
required
Raw standard Base64 or a Base64 data URL such as data:image/png;base64,....
Padded and unpadded Base64 are accepted.
string
required
Stored filename, including its extension.
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.
string
Optional destination folder.
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.
local apiKey = GetConvar("FIVEMESH_API_KEY", "")local payload = json.encode({ data = pngBase64, filename = ("family-%d-member-%d.png"):format(familyId, memberId), contentType = "image/png", path = "family_mugshot", metadata = { familyId = tostring(familyId), memberId = tostring(memberId), source = GetCurrentResourceName(), },})PerformHttpRequest( "https://api.fivemesh.io/v1/objects/base64", function(statusCode, responseBody, _, errorData) local response = responseBody and json.decode(responseBody) or nil if statusCode < 200 or statusCode >= 300 or not response then print(("[FiveMesh] Upload failed (%s): %s"):format( tostring(statusCode), responseBody or errorData or "No response" )) return end print(("[FiveMesh] Uploaded %s"):format(response.object.publicUrl)) end, "POST", payload, { ["Authorization"] = "Bearer " .. apiKey, ["Content-Type"] = "application/json", })
Base64 increases the request size. Prefer the multipart upload route when you
already have file bytes.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"FiveMesh Docs","description":"Documentation for FiveMesh, the cloud infrastructure platform for FiveM servers: FiveMesh CDN for images, phone media and NUI assets, FiveMesh Cache for resource downloads through fileserver_add and adhesive_cdnKey, managed PMA-Voice hosting, server event logging, Discord community Portals and the FiveMesh API and FiveM SDK.","colors":{"primary":"#20221F","light":"#EEEEE7","dark":"#20221F"},"logo":{"light":"https://mintcdn.com/fivemesh/qay7LPDU94tg_FaL/logo/fivemesh-light.svg?fit=max\u0026auto=format\u0026n=qay7LPDU94tg_FaL\u0026q=85\u0026s=18ff27075f9e1b8a7b80ac6f116d8902","dark":"https://mintcdn.com/fivemesh/qay7LPDU94tg_FaL/logo/fivemesh-dark.svg?fit=max\u0026auto=format\u0026n=qay7LPDU94tg_FaL\u0026q=85\u0026s=11fd2f242b18b1459f6c95b840241041","href":"https://fivemesh.io"},"favicon":"https://mintcdn.com/fivemesh/qay7LPDU94tg_FaL/favicons/favicon.ico?fit=max\u0026auto=format\u0026n=qay7LPDU94tg_FaL\u0026q=85\u0026s=0ac5f6a5a2271e662aaec52609262a1a","api":{"mdx":{"auth":{"method":"bearer"},"server":"https://api.fivemesh.io/v1"}},"appearance":{"default":"dark","strict":false},"background":{"color":{"light":"#F7F6F2","dark":"#121310"}},"navbar":{"links":[{"href":"https://discord.gg/wBJamWETxr","label":"Support"}],"primary":{"type":"button","label":"Open dashboard","href":"https://app.fivemesh.io"}},"footer":{"socials":{"github":"https://github.com/FiveMesh","x":"https://x.com/fivemesh_","discord":"https://discord.gg/wBJamWETxr"}},"seo":{"organization":{"id":"https://fivemesh.io/#organization","name":"FiveMesh","url":"https://fivemesh.io/","sameAs":["https://github.com/FiveMesh","https://x.com/fivemesh_","https://www.trustpilot.com/review/fivemesh.io"]}},"fonts":{"family":"Geist"},"icons":{"library":"lucide"},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"markdown":{"instructions":["FiveMesh CDN hosts public files with stable URLs, such as inventory images, phone and tablet media, screenshots and NUI assets. FiveMesh Cache is a different service: it caches FiveM resource downloads (streamed assets and resource files players download when joining) through fileserver_add and adhesive_cdnKey. When a user asks for a \"FiveM CDN\", check which of the two they need.","For FiveMesh Cache, tell users to copy the server.cfg block generated in the dashboard. Never construct the Cache URL from a cfx.re join code, and never reuse another server's adhesive_cdnKey.","Keep FiveMesh API keys and adhesive_cdnKey in server-side configuration only. Use scoped upload URLs for client or NUI uploads."]},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Website","icon":"globe","href":"https://fivemesh.io"},{"anchor":"Dashboard","icon":"layout-dashboard","href":"https://app.fivemesh.io"},{"anchor":"Status","icon":"signal","href":"https://status.fivemesh.io"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"fivemesh","hasAudioNarration":false,"actualSubdomain":"fivemesh","customDomains":["docs.fivemesh.io"],"gitSource":{"type":"github","owner":"fivemesh","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6af514927046dee1c39d0726","clientVersion":"0.0.4128","searchFilterCounts":[{"language":"default","tag":"Overview","count":27},{"language":"default","tag":"API Reference","count":18},{"language":"default","tag":"FiveMesh CDN","count":13},{"language":"default","tag":"SDK","count":7},{"language":"default","tag":"Tools","count":6},{"language":"default","tag":"FiveMesh Backup","count":6},{"language":"default","tag":"FiveM SDK","count":6},{"language":"default","tag":"FiveMesh Logs","count":5},{"language":"default","tag":"Dashboard","count":5},{"language":"default","tag":"FiveMesh Cache","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"styles.css","content":".tryit-button{background-color:#20221F;color:#F7F6F2}.dark .tryit-button{background-color:#EEEEE7;color:#121310}.tryit-button .icon{background-color:currentColor}"}],"page":{"pagePath":"api-reference/cdn-endpoints/upload-base64-object","slug":"/api-reference/cdn-endpoints/upload-base64-object","pageMetadata":{"title":"Upload one Base64 object","description":"Upload a Base64-encoded CDN object with a JSON request.","api":"POST /objects/base64","href":"/api-reference/cdn-endpoints/upload-base64-object"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Upload a Base64-encoded CDN object with a JSON request.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,ParamField,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Upload one Base64-encoded file to FiveMesh CDN from a server-side integration.\nUse this route when the source provides Base64 instead of file bytes, such as a\nscreenshot or mugshot capture.`}),`\n`,_jsxs(_components.p,{children:[`Requires `,_jsx(_components.code,{children:`cdn:write`}),`.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Keep the API key in a server-side script. Never send it to a FiveM client,\nNUI bundle or browser.`})}),`\n`,_jsx(ParamField,{header:`Idempotency-Key`,type:`string`,id:`param-idempotency-key`,children:_jsx(_components.p,{children:`Optional key used to replay the same successful upload response after a retry.`})}),`\n`,_jsx(ParamField,{body:`data`,type:`string`,required:true,id:`param-data`,children:_jsxs(_components.p,{children:[`Raw standard Base64 or a Base64 data URL such as `,_jsx(_components.code,{children:`data:image/png;base64,...`}),`.\nPadded and unpadded Base64 are accepted.`]})}),`\n`,_jsx(ParamField,{body:`filename`,type:`string`,required:true,id:`param-filename`,children:_jsx(_components.p,{children:`Stored filename, including its extension.`})}),`\n`,_jsx(ParamField,{body:`contentType`,type:`string`,id:`param-content-type`,children:_jsxs(_components.p,{children:[`File MIME type, such as `,_jsx(_components.code,{children:`image/png`}),`. When omitted, the API uses the MIME type\nfrom a data URL or falls back to `,_jsx(_components.code,{children:`application/octet-stream`}),`.`]})}),`\n`,_jsx(ParamField,{body:`path`,type:`string`,id:`param-path`,children:_jsx(_components.p,{children:`Optional destination folder.`})}),`\n`,_jsx(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:_jsx(_components.p,{children:`Optional metadata containing string, number or boolean values.`})}),`\n`,_jsx(Heading,{level:`2`,id:`fivem-server-example`,children:`FiveM server example`}),`\n`,_jsx(_components.p,{children:`This example sends raw PNG Base64 from a server-side Lua resource. The API key\nis read from the server ConVar and never sent to the player.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`36`,language:`lua`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`lua`,children:_jsxs(_components.code,{language:`lua`,numberOfLines:`36`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`local`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` GetConvar`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"FIVEMESH_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`local`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` payload`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`encode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` pngBase64`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` filename`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"family-%d-member-%d.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`format`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`familyId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`memberId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` contentType`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"image/png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` path`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"family_mugshot\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` metadata`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` familyId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` tostring`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`familyId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` memberId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` tostring`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`memberId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` source`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` GetCurrentResourceName`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`PerformHttpRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.fivemesh.io/v1/objects/base64\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`statusCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`responseBody`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`_`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`errorData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` local`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` responseBody`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` and`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`decode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`responseBody`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`or`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nil`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` statusCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 200`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` or`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` statusCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 300`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` or`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` then`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[FiveMesh] Upload failed (%s): %s\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`format`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` tostring`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`statusCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` responseBody`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` or`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` errorData`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` or`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"No response\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ))`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` end`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[FiveMesh] Uploaded %s\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`format`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`publicUrl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` end`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bearer \" `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`..`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`Base64 increases the request size. Prefer the multipart upload route when you\nalready have file bytes.`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"family_mugshot/family-1-member-1.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"size\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12345`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contentType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image/png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"etag\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3f2a...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"publicUrl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://cdn.fivemesh.io/acme/family_mugshot/family-1-member-1.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"metadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"familyId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"memberId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"requestId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req_...\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Upload one Base64 object","description":"Upload a Base64-encoded CDN object with a JSON request.","api":"POST /objects/base64","href":"/api-reference/cdn-endpoints/upload-base64-object"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"FiveM server example","slug":"fivem-server-example","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Upload one Base64 object","path":"/objects/base64","servers":[{"url":"https://api.fivemesh.io/v1"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{"Idempotency-Key":{"schema":[{"type":"string","description":"Optional key used to replay the same successful upload response after a retry."}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"data":[{"type":"string","description":"Raw standard Base64 or a Base64 data URL such as `data:image/png;base64,...` . Padded and unpadded Base64 are accepted.","required":true}],"filename":[{"type":"string","description":"Stored filename, including its extension.","required":true}],"contentType":[{"type":"string","description":"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":[{"type":"string","description":"Optional destination folder."}],"metadata":[{"type":"object","properties":{},"description":"Optional metadata containing string, number or boolean values."}]}}],"examples":{"example":{"value":{"data":"\u003cstring>","filename":"\u003cstring>","contentType":"\u003cstring>","path":"\u003cstring>","metadata":{}}}}}}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"fivemesh","siteName":"FiveMesh Docs","title":"Upload one Base64 object - FiveMesh Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-01T20:03:02.696Z","originalFileLocation":"api-reference/cdn-endpoints/upload-base64-object.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Upload a Base64-encoded CDN object with a JSON request.\">\u003cmeta data-mint-head name=\"application-name\" content=\"FiveMesh Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/fivemesh/mbe7hGOmoQYq4PHM/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/fivemesh/mbe7hGOmoQYq4PHM/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/fivemesh/mbe7hGOmoQYq4PHM/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/fivemesh/mbe7hGOmoQYq4PHM/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/fivemesh/mbe7hGOmoQYq4PHM/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/fivemesh/mbe7hGOmoQYq4PHM/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/fivemesh/mbe7hGOmoQYq4PHM/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/fivemesh/mbe7hGOmoQYq4PHM/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/fivemesh/mbe7hGOmoQYq4PHM/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Upload one Base64 object - FiveMesh Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Upload a Base64-encoded CDN object with a JSON request.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"FiveMesh Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.fivemesh.io/api-reference/cdn-endpoints/upload-base64-object\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://fivemesh.mintlify.site/_mintlify/api/og/v2?division=FiveMesh+CDN\u0026amp;title=Upload+one+Base64+object\u0026amp;description=Upload+a+Base64-encoded+CDN+object+with+a+JSON+request.\u0026amp;theme=ec4cfb45a0d87560829c882b\u0026amp;signature=920e72ad74bb6ce00c20abbbbdf221f1d5392be5fd9275527d3228978d2dc6be\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Upload one Base64 object - FiveMesh Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Upload a Base64-encoded CDN object with a JSON request.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://fivemesh.mintlify.site/_mintlify/api/og/v2?division=FiveMesh+CDN\u0026amp;title=Upload+one+Base64+object\u0026amp;description=Upload+a+Base64-encoded+CDN+object+with+a+JSON+request.\u0026amp;theme=ec4cfb45a0d87560829c882b\u0026amp;signature=920e72ad74bb6ce00c20abbbbdf221f1d5392be5fd9275527d3228978d2dc6be\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/fivemesh/mbe7hGOmoQYq4PHM/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"FiveMesh Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#20221F\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.fivemesh.io/api-reference/cdn-endpoints/upload-base64-object\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/cdn-endpoints/upload-base64-object.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://fivemesh.io/#organization\",\"name\":\"FiveMesh\",\"url\":\"https://fivemesh.io/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/fivemesh/qay7LPDU94tg_FaL/logo/fivemesh-light.svg?fit=max\u0026auto=format\u0026n=qay7LPDU94tg_FaL\u0026q=85\u0026s=18ff27075f9e1b8a7b80ac6f116d8902\"},\"sameAs\":[\"https://github.com/FiveMesh\",\"https://x.com/fivemesh_\",\"https://www.trustpilot.com/review/fivemesh.io\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.fivemesh.io#website\",\"name\":\"FiveMesh Docs\",\"url\":\"https://docs.fivemesh.io\",\"publisher\":{\"@id\":\"https://fivemesh.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.fivemesh.io/api-reference/cdn-endpoints/upload-base64-object#webpage\",\"url\":\"https://docs.fivemesh.io/api-reference/cdn-endpoints/upload-base64-object\",\"name\":\"Upload one Base64 object\",\"description\":\"Upload a Base64-encoded CDN object with a JSON request.\",\"dateModified\":\"2026-10-01T20:03:02.696Z\",\"isPartOf\":{\"@id\":\"https://docs.fivemesh.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.fivemesh.io/api-reference/cdn-endpoints/upload-base64-object#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.fivemesh.io/api-reference/cdn-endpoints/upload-base64-object#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"FiveMesh CDN\",\"item\":\"https://docs.fivemesh.io/api-reference/cdn\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Upload one Base64 object\",\"item\":\"https://docs.fivemesh.io/api-reference/cdn-endpoints/upload-base64-object\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.fivemesh.io/api-reference/cdn-endpoints/upload-base64-object#apireference\",\"headline\":\"Upload one Base64 object\",\"name\":\"Upload one Base64 object\",\"description\":\"Upload a Base64-encoded CDN object with a JSON request.\",\"url\":\"https://docs.fivemesh.io/api-reference/cdn-endpoints/upload-base64-object\",\"mainEntityOfPage\":{\"@id\":\"https://docs.fivemesh.io/api-reference/cdn-endpoints/upload-base64-object#webpage\"},\"dateModified\":\"2026-10-01T20:03:02.696Z\",\"publisher\":{\"@id\":\"https://fivemesh.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.fivemesh.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"FiveMesh Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"FiveMesh\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/cdn-endpoints/upload-base64-object.md","siteName":"FiveMesh Docs","nav":{"global":{"anchors":[{"anchor":"Website","icon":"globe","href":"https://fivemesh.io"},{"anchor":"Dashboard","icon":"layout-dashboard","href":"https://app.fivemesh.io"},{"anchor":"Status","icon":"signal","href":"https://status.fivemesh.io"}]},"tabs":[{"tab":"Overview","icon":"book-open","pages":[{"title":"Overview","href":""}]},{"tab":"API Reference","icon":"square-terminal","pages":[{"title":"FiveMesh API reference","sidebarTitle":"API reference","icon":"square-terminal","href":"/api-reference/introduction"},{"title":"Authentication","icon":"key-round","href":"/api-reference/authentication"},{"title":"Inspect an API key","api":"GET /whoami","href":"/api-reference/whoami"},{"group":"FiveMesh CDN","pages":[{"title":"FiveMesh CDN API","icon":"radio-tower","href":"/api-reference/cdn"},{"title":"List objects","api":"GET /objects","href":"/api-reference/cdn-endpoints/list-objects"},{"title":"Upload one object","description":"Upload a single CDN object with a multipart request.","api":"POST /objects","href":"/api-reference/cdn-endpoints/upload-object"},{"title":"Upload one Base64 object","api":"POST /objects/base64","href":"/api-reference/cdn-endpoints/upload-base64-object"},{"title":"Bulk upload objects","description":"Upload multiple CDN objects and receive per-file results.","api":"POST /objects/bulk","href":"/api-reference/cdn-endpoints/bulk-upload-objects"},{"title":"Delete one object","api":"DELETE /objects","href":"/api-reference/cdn-endpoints/delete-object"},{"title":"Bulk delete objects","api":"POST /objects/bulk-delete","href":"/api-reference/cdn-endpoints/bulk-delete-objects"},{"title":"Purge CDN objects","api":"POST /objects/purge","href":"/api-reference/cdn-endpoints/purge-objects"},{"title":"Create an upload URL","api":"GET /presigned-url","href":"/api-reference/cdn-endpoints/create-upload-url"},{"title":"Upload with an upload URL","api":"POST /presigned-url/{token}","href":"/api-reference/cdn-endpoints/upload-with-url"}]},{"group":"FiveMesh Logs","pages":[{"title":"FiveMesh Logs API","icon":"scroll-text","href":"/api-reference/logs"},{"title":"Ingest log events","icon":"cloud-upload","href":"/api-reference/logs-ingestion"},{"title":"Query log events","api":"POST /logs/query","href":"/api-reference/logs-query"}]},{"group":"FiveMesh Cache","pages":[{"title":"FiveMesh Cache API","icon":"hard-drive","href":"/api-reference/cache"}]},{"group":"FiveMesh Voice","pages":[{"title":"FiveMesh Voice API","icon":"mic","href":"/api-reference/voice"}]}]},{"tab":"Tools","icon":"wrench","pages":[{"title":"Tools","href":"/backup/overview"}]},{"tab":"SDK","icon":"code","pages":[{"title":"SDK","href":"/sdk/introduction"}]}]},"basePath":"","title":"Upload one Base64 object - FiveMesh Docs","buildId":"dpl_5tKr6cUUeuVJdEZ9JAEY3h4soMJ8","deploymentId":"dpl_5tKr6cUUeuVJdEZ9JAEY3h4soMJ8","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DbeN8Wo6.js","utils-CwSb5Doc.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BmREeM3N.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-AYjWerCj.js","snippetPresets-QD4ULQlp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-Digj5cjF.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CiHrzluR.js","shallow-D7h7pFGg.js","getApiPlaygroundDisplay-mlxkpAUf.js","CodeSnippet-D2rH5lZI.js","CodeSnippets-B53ulOaL.js","Page-CqcDm2To.js","getPastedJson-DxGeNMih.js","icon-BHbyrebp.js","MethodPill-C7F_KEEJ.js","DuplicateIcon-j3c5-73z.js","createIcon-OvCnyFqD.js","DynamicMarkdown-DpAS3GCb.js","SectionHeading-DMPpdrvW.js","axios-vUo_bRtp.js"]}