For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
GuidesIntegrationsAPI ReferencesRelease notes
GuidesIntegrationsAPI ReferencesRelease notes
    • All integrations
  • Receiving files
    • Framework integrations
    • JavaScript File Uploader
    • React File Uploader
    • Angular File Uploader
    • Vue File Uploader
    • Svelte File Uploader
    • Next.js File Uploader
    • iOS
    • Android
    • CKEditor
    • TinyMCE
    • Redactor
    • Webflow
    • WordPress
    • Contentful CMS
    • JotForm
    • Marketo
  • Managing files
    • JavaScript SDK
    • PHP SDK
    • Python SDK
    • Ruby SDK
    • Rails SDK
    • Java SDK
    • Golang SDK
    • Rust SDK
    • Swift SDK
    • Kotlin SDK
    • Zapier
    • Make
    • Integrately
    • CLI
  • Delivering files
    • Adaptive image component
    • Next.js image loader
    • NuxtImage
  • From community
    • Shopify
    • Shopify (Debut theme)
    • WooCommerce
    • PHP Transformation URLs generation
    • Laravel Flysystem driver
    • Unpic Universal CDN URL translator
    • C# SDK
    • Erlang SDK
    • Elixir SDK
    • Flutter SDK
Dashboard
LogoLogo
On this page
  • Features
  • Install
  • Usage examples
  • Full documentation
  • Related guides
Managing files

JS API clients

Was this page helpful?
Previous

PHP API Client

Next
Built with

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.

JS API clients GitHub →

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)

Install

$npm install @uploadcare/upload-client
$npm install @uploadcare/rest-client
$npm install @uploadcare/signed-uploads

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:

1import { UploadClient } from '@uploadcare/upload-client'
2
3const client = new UploadClient({ publicKey: 'YOUR_PUBLIC_KEY' })

Once the UploadClient instance is created, you can start using the wrapper to upload files from binary data:

1client
2 .uploadFile(fileData)
3 .then(file => console.log(file.uuid))

To upload files securely, you can use signed uploads.

For the REST API client you must specify both YOUR_PUBLIC_KEY and YOUR_SECRET_KEY:

1import { listOfFiles, UploadcareSimpleAuthSchema } from '@uploadcare/rest-client';
2
3const uploadcareSimpleAuthSchema = new UploadcareSimpleAuthSchema({
4 publicKey: 'YOUR_PUBLIC_KEY',
5 secretKey: 'YOUR_SECRET_KEY',
6});
7
8const result = await listOfFiles({}, { authSchema: uploadcareSimpleAuthSchema })

Please, read the REST API client’s authentication docs before use it.

Full documentation

Read the full documentation on JS API clients GitHub.

Related guides

  • File Uploader
  • jQuery File Uploader