cloudku-uploader

2.2.5 • Public • Published

🌩️ Cloudku Uploader

Cloudku Uploader is a lightweight Node.js package that makes it easy to upload files to CloudkuImages.
It supports both CommonJS (CJS) and ECMAScript Modules (ESM).

npm version
License: MIT
Node.js
Support CJS & ESM


📦 Installation

npm install cloudku-uploader

🚀 Usages

1. CommonJS (CJS)

const uploadFile = require('cloudku-uploader');
const fs = require('fs');

(async () => {
  const buffer = fs.readFileSync('example.jpg');
  const result = await uploadFile(buffer, 'example.jpg');
  console.log(result);
})();

2. ECMAScript Modules (ESM)

import uploadFile from 'cloudku-uploader';
import fs from 'fs';

(async () => {
  const buffer = fs.readFileSync('example.jpg');
  const result = await uploadFile(buffer, 'example.jpg');
  console.log(result);
})();

📌 Api Responses Structure

Field Type Description
status String Upload status: ("success") / ("Error)
url String Direct link to uploaded file
fileName String Final uploaded file name
size Number File size in readable format (KB, MB)
type String MIME type of the file
info String Official channel for info & support

📥 API Response

{
  "status": "success",
  "url": "https://cloudkuimages.com/uploads/example.jpg",
  "fileName": "example.jpg",
  "size": "1.27 MB",
  "type": "image/jpeg",
  "information": "https://cloudkuimages.com/ch"
}

🛡 License & Legal

This package is under a Custom MIT License:

You may not copy, modify, resell, or redistribute this package without explicit permission. Violators will be prosecuted under Indonesian and international copyright law.

📄 See full LICENSE file for complete details.

🙋 Support & Contact

Got questions or feedback? Reach out: 🌐 Website: Cloudkuimages 💬 WhatsApp: channels 🎲Github: GitHub


👨‍💻 Author

Package Sidebar

Install

npm i cloudku-uploader

Weekly Downloads

11,325

Version

2.2.5

License

MIT

Unpacked Size

7.57 kB

Total Files

7

Last publish

Collaborators

  • alfidev
  • cloudkuimages
  • flowfalcon