Official Node.js SDK for Qiniu Cloud Storage (Kodo) API. Current stable version is 7.15.2, released monthly. Supports bucket operations, object upload/download, CDN management, and persistent processing. Differentiators: simplified upload with token generation, resumable upload, and comprehensive integration with Qiniu's ecosystem. Ships TypeScript definitions.
npm install qiniuNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configure Qiniu SDK with access keys, generate an upload token, and upload a file using form upload.
Set config.zone to the appropriate zone: Zone_z0 (East China), Zone_z1 (North China), Zone_z2 (South China), Zone_na0 (North America), Zone_as0 (Singapore).
Provide returnBody in PutPolicy options to specify custom response fields.
Use import qiniu from 'qiniu' or const qiniu = require('qiniu').default if using TypeScript with esModuleInterop.Update to new API patterns as per v7 documentation.
Pass a config object with urls and direction parameters.
Check that process.env.QINIU_ACCESS_KEY and QINIU_SECRET_KEY are correctly set, or pass them directly.
Verify bucket name spelling and that the bucket exists in the configured zone.
Run npm install qiniu and ensure the import is 'qiniu' (not 'qiniu-sdk').