cloudku-uploader
Advanced tools
Comparing version
{ | ||
"name": "cloudku-uploader", | ||
"version": "2.0.0", | ||
"description": "Uploader All Type File Dengan CloudkuImages dan proses yang lebih cepat", | ||
"version": "2.1.0", | ||
"description": "A powerful and easy-to-use uploader for all file types using CloudKuImages API. Supports auto conversion, fast upload, and modern Node.js support.", | ||
"main": "index.cjs", | ||
@@ -14,12 +14,27 @@ "module": "index.mjs", | ||
"cloudku", | ||
"uploader", | ||
"cloudkuimages", | ||
"file-uploader", | ||
"file-upload", | ||
"cloud-storage", | ||
"cloudkuimages" | ||
"media-uploader", | ||
"nodejs-uploader", | ||
"upload-api", | ||
"auto-convert", | ||
"upload-images", | ||
"upload-videos", | ||
"upload-audios" | ||
], | ||
"author": "Alfi Dev", | ||
"author": "Alfi Dev <support@cloudkuimages.com>", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/AlfiCloud/cloudku-uploader" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/AlfiCloud/cloudku-uploader/issues" | ||
}, | ||
"homepage": "https://cloudkuimages.com", | ||
"dependencies": { | ||
"node-fetch": "^3.3.1", | ||
"form-data": "^4.0.0" | ||
"form-data": "^4.0.0", | ||
"node-fetch": "^3.3.1" | ||
}, | ||
@@ -26,0 +41,0 @@ "engines": { |
# 🌩️ Cloudku Uploader | ||
Cloudku Uploader adalah package Node.js yang memudahkan Anda untuk mengunggah file ke [CloudkuImages](https://cloudkuimages.com). Mendukung penggunaan CommonJS (CJS) dan ECMAScript Modules (ESM). | ||
Cloudku Uploader is a lightweight Node.js package that makes it easy to upload files to [CloudkuImages](https://cloudkuimages.com). | ||
It supports both **CommonJS (CJS)** and **ECMAScript Modules (ESM)**. | ||
[](https://www.npmjs.com/package/cloudku-uploader) | ||
[](LICENSE) | ||
[](https://nodejs.org/) | ||
[](#) | ||
--- | ||
## 📦 Instalasi | ||
```sh | ||
## 📦 Installation | ||
```bash | ||
npm install cloudku-uploader | ||
@@ -15,3 +20,3 @@ ``` | ||
## 🚀 Penggunaan | ||
## 🚀 Usages | ||
@@ -21,13 +26,9 @@ ### **1. CommonJS (CJS)** | ||
```js | ||
const { uploadFile } = require('cloudku-uploader'); | ||
const uploadFile = require('cloudku-uploader'); | ||
const fs = require('fs'); | ||
(async () => { | ||
try { | ||
const fileBuffer = fs.readFileSync('example.jpg'); | ||
const response = await uploadFile(fileBuffer, 'example.jpg'); | ||
console.log(response); | ||
} catch (error) { | ||
console.error("Upload gagal:", error); | ||
} | ||
const buffer = fs.readFileSync('example.jpg'); | ||
const result = await uploadFile(buffer, 'example.jpg'); | ||
console.log(result); | ||
})(); | ||
@@ -39,13 +40,9 @@ ``` | ||
```js | ||
import { uploadFile } from 'cloudku-uploader'; | ||
import uploadFile from 'cloudku-uploader'; | ||
import fs from 'fs'; | ||
(async () => { | ||
try { | ||
const fileBuffer = fs.readFileSync('example.jpg'); | ||
const response = await uploadFile(fileBuffer, 'example.jpg'); | ||
console.log(response); | ||
} catch (error) { | ||
console.error("Upload gagal:", error); | ||
} | ||
const buffer = fs.readFileSync('example.jpg'); | ||
const result = await uploadFile(buffer, 'example.jpg'); | ||
console.log(result); | ||
})(); | ||
@@ -56,13 +53,14 @@ ``` | ||
## 📌 Response API | ||
## 📌 Api Responses Structure | ||
| Parameter | Tipe | Deskripsi | | ||
| ---------- | ------ | ------------------------------------ | | ||
| `status` | String | Status upload (`success` / `error`) | | ||
| `url` | String | Link file yang telah diunggah | | ||
| `fileName` | String | Nama file yang diunggah | | ||
| `size` | Number | Ukuran file dalam byte | | ||
| `type` | String | Tipe MIME file | | ||
| 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 | | ||
Contoh Response JSON: | ||
📥 API Response | ||
@@ -74,4 +72,5 @@ ```json | ||
"fileName": "example.jpg", | ||
"size": 204800, | ||
"type": "image/jpeg" | ||
"size": "1.27 MB", | ||
"type": "image/jpeg", | ||
"information": "https://cloudkuimages.com/ch" | ||
} | ||
@@ -82,12 +81,17 @@ ``` | ||
## ⚙️ Kontribusi | ||
## 🛡 License & Legal | ||
This package is under a Custom MIT License: | ||
Kami menyambut kontribusi dari siapa pun! Jika ingin berkontribusi, silakan buat issue atau pull request di [GitHub](https://github.com/AlfiCloud/CloudkuUploader). | ||
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. | ||
--- | ||
## 📜 Lisensi | ||
## 🙋 Support & Contact | ||
Got questions or feedback? Reach out: | ||
🌐 Website: [Cloudkuimages](https://cloudkuimages.com) | ||
💬 WhatsApp: [channels](https://cloudkuimages.com/ch) | ||
🎲Github: [GitHub](https://github.com/AlfiCloud) | ||
Lisensi **MIT** © 2025 [CloudkuImages](https://cloudkuimages.com) | ||
--- | ||
@@ -94,0 +98,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 2 instances in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
7476
102.05%7
75%65
170.83%0
-100%0
-100%95
4.4%1
Infinity%80
-20%5
150%