@uploadcare/upload-client
JavaScript client for Uploadcare file upload API, handling multipart uploads, progress, and CDN URL generation.
Official Documentation ↗v0.1. Check the official docs for the latest API surface.Installation
npm install @uploadcare/upload-clientMethods
No methods match this filter.
@uploadcare/upload-client is javascript client for uploadcare file upload api, handling multipart uploads, progress, and cdn url generation. This page documents the core methods, installation, and common usage patterns for the current stable release.
Installation
Install @uploadcare/upload-client with your preferred package manager using the command shown in the frontmatter. The package is published to the npm registry and ships with TypeScript types where applicable.
Core methods
The methods listed in the frontmatter cover the primary API surface. Each signature reflects the v0.1 release. Consult the official documentation linked in sourceUrl for advanced options, edge cases, and breaking changes between major versions.
Frequently asked questions
The faq section in the frontmatter answers the most common questions about @uploadcare/upload-client, including comparisons with alternatives, configuration tips, and runtime requirements. If your question is not covered, check the source URL for the full guide.
Errors
The official API reference declares the following error types:
UploadcareError(错误基类(导出类)) — official text: “export declare class UploadcareError extends Error {” (source: https://cdn.jsdelivr.net/npm/@uploadcare/upload-client@latest/dist/index.d.ts, fetched 2026-11-08T20:11:00+08:00)NetworkError(UploadcareError 子类) — official text: “export declare class NetworkError extends UploadcareError {” (source: https://cdn.jsdelivr.net/npm/@uploadcare/upload-client@latest/dist/index.d.ts, fetched 2026-11-08T20:11:00+08:00)CancelError(UploadcareError 子类) — official text: “export declare class CancelError extends UploadcareError {” (source: https://cdn.jsdelivr.net/npm/@uploadcare/upload-client@latest/dist/index.d.ts, fetched 2026-11-08T20:11:00+08:00)ServerErrorCode(服务端错误码联合类型(Upload API Errors)) — official text: “/** @see https://uploadcare.com/api-refs/upload-api/#tag/Errors */ export type ServerErrorCode = “AccountBlockedError” | “AccountLimitsExceededError” | “AccountUnpaidError” | “AutostoreDisabledError” | “BaseViewsError” | “FileMetadataKeyDuplicatedError” | “Fil” (source: https://cdn.jsdelivr.net/npm/@uploadcare/upload-client@latest/dist/index.d.ts, fetched 2026-11-08T20:11:00+08:00)
API reference evidence
Fetched from official sources on 2026-11-08T20:11:00+08:00 via WebFetch https://uploadcare.com/docs/api_reference/upload/;WebFetch https://cdn.jsdelivr.net/npm/@uploadcare/upload-client@latest/dist/index.d.ts(381 行处截断于 fromUrlStatus);WebFetch https://cdn.jsdelivr.net/npm/@uploadcare/upload-client@latest/README.md.
uploadFile→ signature from https://cdn.jsdelivr.net/npm/@uploadcare/upload-client@latest/README.md; official text: “uploadFile( data: Blob | File | Buffer | ReactNativeAsset | Url | Uuid, options: FileFromOptions ): Promise”
FAQ
- Does it handle large files?
- Yes. Files over 10 MB use multipart upload automatically.
- What is a CDN URL?
- Uploadcare returns a CDN URL like https://ucarecdn.com/:uuid/ that supports on-the-fly transforms.
- Is it framework-agnostic?
- Yes. It works in browsers and Node.js with fetch.
Report a problem with this API docOpens a pre-filled issue on GitHub.