The @sypnia/files package
One npm package with subpaths for browsers, servers and React.
| Import | For |
|---|---|
@sypnia/files/client | browsers and apps: uploads (direct and resumable), downloads, URLs, signed URLs, with the user’s session |
@sypnia/files/server | servers: the secret key, bucket management, policies, imports, S3 keys |
@sypnia/files/react | useUpload() and <FileDrop> with progress and resume |
npx @sypnia/files | the CLI |
import { createFiles } from '@sypnia/files/client';
const files = createFiles('https://<ref>.files.sypnia.com', { session: sypnia.auth });session accepts a @sypnia/data client, any object with getAccessToken(), or a function returning a token, so it works with other auth providers. ESM with types, Node 20+, browsers, Bun, Deno and React Native.