JS API clients
JS API clients handle uploads and file operations by wrapping Uploadcare Upload API and REST API. You can use it from within your Node.js app and in a browser.
Features
Uploading (Upload API):
- Upload files from local storage and URLs (up to 5 TB)
- Multipart uploading for large files
- Track uploading progress
- Bulk file uploading
- Uploading network to speed uploading jobs (like CDN)
- Secure uploads (signed uploads)
File management (REST API):
- Get file info and perform various operations (store/delete/copy) with them
- Manage metadata
- Manage webhooks
- Convert documents
- Encode and transform videos
- Secure authentication
Image processing (URL API):
- Compression
- Geometry
- Colors
- Definition
- Image and text overlays
- Rotations
- Recognition
- File info
- Proxy (fetch)
Requirements
Node.js 16 or later.
Install
Usage examples
To access the Upload Client High-Level API, you need to create an instance of UploadClient
providing the necessary settings. Specifying YOUR_PUBLIC_KEY is mandatory. It
points to the specific Uploadcare project:
Once the UploadClient instance is created, you can start using the wrapper to upload files from binary data:
Note: The
storeoption acceptstrue,false, or"auto". String values like"true"or"false"are not accepted.
Signed uploads
To upload files securely, use the @uploadcare/signed-uploads package:
Bulk uploads
Use Queue to control concurrency when uploading multiple files:
Error handling
Authentication
For server-side usage, use UploadcareSimpleAuthSchema:
Note: Never use
UploadcareSimpleAuthSchemaon the client side — it exposes your secret key. For client-side usage, useUploadcareAuthSchemawith asignatureResolverthat delegates signing to your backend. For client-side usage:
Pagination
Use the paginate helper to iterate through all pages of results:
File conversion
Convert video and document files using the unified convert API:
Full documentation
Read the full documentation on JS API clients GitHub.