ReboFilesDocs
Start3
What is ReboFiles
Getting started
Demos to run
Put it in your app6
React component
Headless: your own UI
Without a framework
Styling and themes
Keyboard and accessibility
Languages
Files9
Uploads
Previews and the viewer
Search
Live changes and large folders
Comments
Starred and fields
Versions, trash and space
Download as .zip
Word documents
The server14
The route
Frameworks and sign-in
Who may do what
Storage: S3, GCS, Azure and disk
Checking uploads
Metadata: SQLite and Postgres
Database schema
Sharing and links
Activity and notifications
Hooks, logs and limits
Retention, holds and export
Desktop and other origins
Sync a folder
Going to production
Together1
AI assistants (MCP)
Reference5
Packages
Components and hooks
Client API
HTTP routes
Status and roadmap
↑↓ to move↵ to openEsc to close38 pages

Reference Client API

Client API

The client the drive and the hooks are built on, and createMemoryClient answers the same, from the page. A refusal of the server is thrown as a RequestError with its status and code: name-taken, in-trash, over-quota, forbidden…
Start

Make one

import { createDriveClient } from '@rebofiles/drive'; // or @rebofiles/react

const client = createDriveClient({
  base: '/api/files',
  headers: async () => ({ authorization: `Bearer ${await token()}` }),
  parallel: 3,                          // parts at once, of each file
  retry: { attempts: 5, delay: 1000 },  // a part that fails, again
});

const { entries } = await client.list(null);
const file = await client.upload(input.files[0], { parent: entries[0].id, onProgress: ({ sent, size }) => draw(sent / size) });
Methods

Reading

MethodWhat it does
list(folder)What is in a folder, or at the top with null, and the path down to it.
entry(id)One entry, where it is, and whether it is in the trash.
recent()The files changed last.
trash()What is in one’s trash.
shared()What others shared with the one asking.
sharedNew()How many of those are new since they last looked.
searchText(query)By what is written in files, each with a piece of its text.
activity(id, limit?)Who did what to an entry, and in a folder; the newest first.
usage()The bytes one keeps, and how many one may.
starred()What the one asking starred, the last starred first.
withField(name, value)What has a field set to a value, of what one may read: the files of a client, of a case.
Methods

Changing

MethodWhat it does
createFolder(name, parent)A folder; “(2)” when the name is taken.
rename(id, name, 'keep-both'?)Refused when the name is taken there, unless both are kept.
move(id, parent, 'keep-both'?)Into another folder, or to the top.
setColor(id, color | null)A folder in one of the drive’s nine colours, or its own again.
copy(id, parent?)A copy of a file, its bytes copied in the storage: beside it, or at one’s own top where one may not put it.
setFields(id, { name: value | null })Fields of your application on an entry, each to its text, or taken away with null.
star(id, starred?)Starred by the one asking, or no longer with false: their own, seen by nobody else.
moveToTrash(id)Into the trash, with what is inside it.
restore(id)Out of the trash, back where it was.
deleteForever(id)Gone, its bytes too.
emptyTrash()One’s whole trash, gone.
restoreVersion(id, version)An old version back, as a new one, without sending its bytes again.
Methods

Uploads

MethodWhat it does
upload(file, { parent, file, onProgress, signal, images, text, sha256 })A file in parts, resumed after a cut; file for a new version; its smaller pictures, placeholder and text sent after it.
duplicates(hashes)The files with these bytes already, of what one may read.
Methods

Sharing

MethodWhat it does
share(id, who, role, days?)With someone, or everyone signed in as *, as viewer, commenter or editor; for days, for good with null, as before unless said.
unshare(id, who)No longer; anyone may leave what was shared with them.
people(query)Who matches what is typed, people and groups, as the application finds them (people of the server).
names(ids)How each of these is called, people and group: ids; one not known left out.
linkToken(id, link)The token of a link made before: the same every time.
Methods

Requests

MethodWhat it does
received()What came through one’s requests for files, the newest first.
requests()One’s requests for files: each folder, its link, its token and what came.
remind(id, link)Whom a request was sent to, reminded now of what is missing, with the server’s reminders.
expiring(days?)Files one may read whose field expires comes within so many days (15), or passed; the soonest first.
review(id, status, reason?)A file that came accepted, or returned with a reason the sender’s page shows; looked at no more with null.
Methods

Files

MethodWhat it does
url(id, { version, inline, size })An address to read a file from: a download, or to show it at a size.
urls(ids, { inline, size })Those of many files at once, each with until when it is good.
pack(ids)What an archive of some entries holds, for downloadZip.
Methods

Settings

MethodWhat it does
settings()The drive’s settings, one’s own, and whether one may change the drive’s.
saveSettings(settings)The drive’s, for whoever may configure it.
saveMySettings(mine)One’s own language and theme.
Methods

Live

MethodWhat it does
watch(onChange, { onState })What anyone changes, as it happens: the folders and entries of each change one may see. Comes back by itself after a cut. Returns what stops it.
Methods

Comments

MethodWhat it does
comments(id)What is said of an entry, each thread with its replies under it.
addComment(id, text, replyTo?)A comment, or a reply under one; whom it names with @ are told.
editComment(id, comment, text)What one’s own comment says.
resolveComment(id, comment, resolved?)A thread dealt with, or open again.
removeComment(id, comment)Taken back, with its replies: by its author, or the owner.
Methods

Keeping

MethodWhat it does
hold(id, reason?)A legal hold: neither it nor what is in it trashed or deleted until released. For who may configure.
release(id)The hold taken off.
exportPerson(user?)Everything of a person, for a .zip: what they own, said and did.
Methods

Told

MethodWhat it does
notifications()What the one asking was told (shared with them or a group of theirs, named in a comment), the newest first, and how many are new.
sawNotifications()They looked: none is new any more.
Methods

Looking after

MethodWhat it does
adminUsage()For who may configure: the files, folders and bytes of each person, and of the whole drive.
adminRequests()For who may configure: every request for files open, whom it was sent to and what is still missing, to remind them.
adminActivity(limit?)For who may configure: what was done anywhere in the drive, the newest first.