Appbricx
Docs
FeaturesPricingStart free

Get started

OverviewWhat Appbricx isQuickstart with a coding agentQuickstart with the builderCore concepts

Guides

Data and tablesAccess and rolesBusiness rulesSign-inCustom screensRealtime and topicsWorkflows, schedules and webhooksServer functionsAI in your appPaymentsFilesMessagesIntegrationsVerifyPublishing, domains and rollbackOperating your appExport and self-hostSelf-host install

Tutorials

Build a booking app with Claude CodeMulti-user todo listClient portalSlack on new sign-upTemplates

Reference

Reference homeFrontend SDKHTTP APIMCP toolsCLIIntegrations catalogContract formatAI key resolutionRun Appbricx locally

Files

Upload a user file into the project's object store and store the returned URL in an image or attachment field.

1 membersSDK referenceGuide: Files

On this page
  1. app.upload
  2. app.upload

app.upload

app.uploadmethod

Upload a user file (two steps: /files/sign checks type and size and signs a file id, then the file is posted to /files/direct). Store the returned url in an image or attachment field.

app.upload(file: File): Promise<{ url: string; name: string }>

Parameters

NameTypeDescription
filerequiredFileA browser File, e.g. from an <input type="file">.
Returns
{ url, name }. url is /__appbricx/files/<id>?env=<dev|prod> on the app's API origin.
Errors
  • "file uploads aren't available in this preview" without a runtime.
  • "That file type isn't allowed." (images, PDF, text, audio, video, JSON, ZIP, XML and Office documents are), "That file is too large." (25 MB by default).
  • The server's code when the upload fails: MISSING_FILE, STORAGE_ERROR, META_INSERT_FAILED.
Permissions
Needs a signed-in app user. File metadata lives in _appbricx_files with owner row-level security; reading a file back needs a session that can see its row.
Example
async function onPick(e: ChangeEvent<HTMLInputElement>) {
  const file = e.target.files?.[0];
  if (!file) return;
  const { url } = await app.upload(file);
  await app.update("members", app.me("member")!, { avatar: url });
}

RelatedPOST /__appbricx/files/signPOST /__appbricx/files/directGET /__appbricx/files/:id

Source: packages/appkit/src/kits/primitives/app-handle.ts:182

On this page

  1. app.upload
  2. app.upload
Appbricx

The backend, runtime and hosting for apps your coding agent builds. On our cloud, in yours, or on your own servers.

Features

Coding agents and MCPVerify testingBuilder consolePostgres databaseData APIRealtimeRow-level securitySign-in and authPaymentsWorkflows and jobsAI in your appIntegrationsBackups and rollbackHosting and domainsSelf-host and exportAll features

Product

ShowcasePricingFor coding agentsTemplatesPrivate cloudBring your own AI keyFAQ

Compare

Appbricx vs SupabaseLovable alternativeBolt alternativeFor freelancersFor agencies

Resources

DocumentationReferenceBlogSupportContact

© 2026 Appbricx. All rights reserved.

TermsPrivacyCookiesAcceptable Use