fadzzz-uploader
Version:
A powerful and easy-to-use uploader for all file types using FadzzzCloud API. Supports auto conversion, fast upload, and modern Node.js support.
93 lines (68 loc) âĸ 2.74 kB
Markdown
# đŠī¸ Fadzzz Uploader
Fadzzz Uploader is a lightweight Node.js package that makes it easy to upload files to [FadzzzCloud](https://fadzzzcloud.biz.id).
It supports both **CommonJS (CJS)** and **ECMAScript Modules (ESM)**.
[](https://www.npmjs.com/package/fadzzz-uploader)
[](LICENSE)
[](https://nodejs.org/)
[](#)
## đĻ Installation
```bash
npm install fadzzz-uploader
```
## đ Usages
### **1. CommonJS (CJS)**
```js
const uploadFile = require('fadzzz-uploader');
const fs = require('fs');
(async () => {
const result = await uploadFile('/path/to/your/file.png');
console.log(result);
})();
```
### **2. ECMAScript Modules (ESM)**
```js
import uploadFile from 'fadzzz-uploader';
import fs from 'fs';
(async () => {
const result = await uploadFile('/path/to/your/file.png');
console.log(result);
})();
```
## đ Api Responses Structure
| Field | Type | Description |
| ---------- | ------ | ------------------------------------- |
| `status` | String | Upload status: ("true") / ("false") |
| `message` | String | Information on whether the file was uploaded successfully or not |
| `filename` | String | Final uploaded file name |
| `url` | String | Direct link to uploaded file |
| `size` | Number | File size in readable format (KB, MB) |
| `type` | String | MIME type of the file |
đĨ API Response
```json
{
success: true,
message: 'Berkas berhasil di-upload!',
filename: 'uploads-12345678910.png',
url: 'https://fadzzzcloud.biz.id/files/uploads-12345678910.png',
size: '60.64 KB',
type: 'image/png'
}
```
## đĄ 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: [FadzzzCloud](https://fadzzzcloud.biz.id)
đŦ WhatsApp: [Channels](https://whatsapp.com/channel/0029VaxYWls5q08hTLgqKp3K)
đ˛ Github: [GitHub](https://github.com/fadzzzslebew)
## đ¨âđģ Author
- **Fadzzz Digital** - [GitHub](https://github.com/fadzzzslebew) | [Website](https://fadzzzcloud.biz.id)