@digicroz/filestore-server
v1.0.5
Published
Server-side SDK for DC FileStore — provides methods for file upload, download, and management
Maintainers
Readme
@digicroz/filestore-server
Server-side SDK for DC FileStore — provides methods for file upload, download, and management.
Installation
npm install @digicroz/filestore-serverUsage
import { createFileStoreClient } from "@digicroz/filestore-server";
// Initialize the client
const client = createFileStoreClient("production_remote");
// Available methods:
// client.getPathInfo(...)
// client.getFileInfo(...)
// client.requestUploadUrl(...)
// client.confirmUpload(...)
// client.deleteFile(...)How to Get an Access Token
To get an access token for the FileStore, follow these steps:
- Visit https://filestore.digicroz.com/
- If you don't have a Digicroz Account, first create one at https://accounts.digicroz.com
- Create a bucket
- Create a base level directory in that bucket
- Go to the buckets page and click on the Access Tokens button
- Use your directory ID and key name, then generate the access token
Note: The token is shown only once! Be sure to note it down immediately after generation.
