Client-side JavaScript SDK for uploading files to Qiniu Cloud Storage directly from the browser. Current stable version is 3.4.4, with 4.x in beta (adding WebWorker, mini-program, Harmony support). Supports chunked upload for files >4MB with resume capability, and image processing (thumbnailing, watermarking, etc.). Requires a server-side token for authentication. Works in IE11+, Edge, Chrome, Firefox, Safari. Compared to alternatives like AWS SDK for S3, this is the official Qiniu SDK with native Chinese documentation and regional optimizations.
npm install qiniu-jsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes an upload from a file input, fetches an upload token from server, and starts upload with progress logging.
Update code to use qiniu.upload with .subscribe() pattern. See migration guide at https://github.com/qiniu/js-sdk/wiki/2.x-升级到-3.x-文档注意事项
If you rely on the old default (false), explicitly set config.useCdnDomain: false.
Remove calls to getUploadUrl() and pass uploadUrl in the config object to qiniu.upload().
Add 'import "core-js/stable"; import "regenerator-runtime/runtime";' before importing qiniu-js.
Use: import * as qiniu from 'qiniu-js' or const qiniu = require('qiniu-js')Ensure token is a valid uptoken string and not expired. Generate a new one from your server.
Run: npm install rxjs (version ^6.0.0 recommended)
No dependency data recorded yet.