Docs / Getting started
Store your app's files
Recordings, transcripts and exports from your app go into FiveDock over S3. Any S3 library works, and no file gets a public link.
Get a key
In the panel, open Tokens. Pick Private app data, name the token and press Create token. Then press Copy as .env and paste it into your app's .env file:
S3_ENDPOINT=https://s3.fivedock.dev
S3_REGION=auto
S3_BUCKET=my-city
S3_ACCESS_KEY_ID=AKFD…
S3_SECRET_ACCESS_KEY=…The secret is shown once. If you lose it, revoke the token and make a new one.
Upload and read
The FiveDock SDK needs nothing but the .env. With another S3 client, point it at the endpoint, turn on path-style addressing and send a ContentType with each file.
// npm install @fivedock/sdk@beta
import { storage } from '@fivedock/sdk/storage';
const files = storage();
await files.put('recordings/case-1042.ogg', audio, { contentType: 'audio/ogg' });
const file = await files.get('recordings/case-1042.ogg');Share one file
A signed link opens one file until it expires, after 7 days at most. Make it at the moment someone opens the file.
const url = await files.link('recordings/case-1042.ogg', { expiresIn: 3600 });What private means
- No public link
- A file opens only through a signed link or a signed S3 request. In the panel it shows a lock.
- No way to publish
- This key cannot make a file public. A request for
public-readgetsAccessDenied.
Bring the files you have
rclone copies a whole bucket from MinIO, R2 or AWS. Add FiveDock as a remote with your private key, as shown in Upload files yourself, then copy:
rclone copy minio:recordings fivedock:my-city/recordings --transfers 32 --progress