All primitives

Storage

File Server

Let your application work with files.

The idea

Give customer documents a safe place to land.

Imagine building a portal where customers upload documents.

They might upload photos, PDFs, spreadsheets, or videos.

Your application needs to receive those files, store them safely, and make them available to authorized users.

That's what a File Server does.

Application blip

Client Documents

Demo workspace
Upload a document
Drop a file in the area below, or choose a sample to see the upload flow.

Drop a file here

or browse your device

Files are limited to 25 MB in this demo. Uploads stay in this browser session only.

This is a client-side simulation; a production service would store files privately and check access on the server.
Shared documents
Sample files available in the client portal.
3 files
  • Contract.pdf

    1007 B Sample document

  • PropertyPhoto.jpg

    393.9 KB Sample document

  • Budget.xlsx

    1.6 KB Sample document

Behind the scenes

From a browser to authorized access.

  1. Browser
  2. Upload
  3. File storage
  4. Authorized access

File bytes live in storage. Ownership and access rules decide who can retrieve them, and a server can issue temporary links only after checking the user's permission.

What could you build?

  • Document portals
  • Media libraries
  • User-generated content applications
  • File-sharing tools

Implementation notes

  • Accept files through a trusted upload flow.
  • Keep file bytes in storage and metadata in a database.
  • Use signed URLs and user ownership to control access.
  • Validate file type and size on the server.

Implementing it

With a coding agent

Ask your agent to add file uploads

Agent setup (mock link)

Copy this prompt, fill in the bracketed details, and paste it into your coding agent. It describes the goal, the upload rules, and the guardrails.

Bracketed text marks details only you can fill in. 840 / 6,000 characters.

Fill in:FILE TYPESAPP OR PRODUCTWHO UPLOADS AND WHO VIEWSMAX FILE SIZEALLOWED FILE TYPESFILE METADATAWHERE FILES APPEARWHO CAN ACCESS FILESIMPORTANT UPLOAD, ACCESS, AND REJECTED-FILE CASES

Good foundation · 65/100

Traditional SDK / API

Upload and access a client document

TypeScript
const storedFile = await ultrahost.files.upload({
  file,
  ownerId: user.id,
})

const url = await ultrahost.files.createSignedUrl(storedFile.key, {
  expiresIn: 300,
})

Key takeaway

A File Server gives your application a place to store and deliver files without building the underlying storage infrastructure.

Next primitive

RAG