Revision history
Rev. |
Date |
Author |
Dscription |
1.0 |
Nov 30, 2022 |
Kolya Nikolai Madridano |
Added revision table and convert other options to built-in functions |
What is upcloudify?
upcloudify is a javascript package that allows you to easily upload files to your cloud.
✔️ Upload your files with short block of codes
✔️ Built in video and image compression
✔️ Use anywhere with your javascript projects
Supports
✔️ Cloudinary
✔️ Amazon S3 (In progress)
Installation
Open your desired command line tool and run these commands
$ mkdir project_name
$ cd project_name
$ npm i @koalaranger/upcloudify
Supported video types
Video Type |
Extension |
MIME Type |
Flash |
.flv |
video/x-flv |
MPEG-4 |
.mp4 |
video/mp4 |
iPhone Index |
.m3u8 |
video/x-mpegURL |
iPhone Segment |
.ts |
video/MP2T |
3GP Mobile |
.3gp |
video/3gpp |
QuickTime |
.mov |
video/quicktime |
A/V Interleave |
.avi |
video/x-msvideo |
Windows Media |
.wmv |
video/x-ms-wmv |
Supported image types
Image Type |
Extension |
MIME Type |
PNG |
.png |
image/png |
JPG |
.jpg |
image/jpg |
JPEG |
.jpeg |
image/jpeg |
SVG |
.svg |
image/svg+xml |
WEBP |
.webp |
image/webp |
AVIF |
.avif |
image/avif |
Cloudinary
Cloudinary homepage
Cloudinary secrets
![cloudinary credentials](https://camo.githubusercontent.com/b1d7310e6d45264885a5d781c04072b4aa7e80684cfb1538528e8c10b05f6947/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f646969676b636336672f696d6167652f75706c6f61642f76313636393532383035342f74656d70736e69705f696a766239772e706e67)
Cloudinary upload usage
// Configuration
const upcloudify = new CloudinaryUpload({
api_key: "927*********4",
api_secret: "LUlMVq******-Lf06*****",
cloud_name: "d************g"
});
// files must be an array of File
const files = [
{
fieldname: 'file',
originalname: 'sample_image.jpg',
encoding: '7bit',
mimetype: 'image/jpeg',
destination: 'C:\\Users\\USERNAME\\AppData\\Local\\Temp',
filename: '771ec752e412cf',
path: 'C:\\Users\\USERNAME\\AppData\\Local\\Temp\\771ec752e412cf',
size: 40055
}
]
// Uploading images
const result = await upcloudify
.cartoonify() // add cartoonify effect
.blur(300) // add blurry effect
.uploadImage(files);
// Uploading videos
const result = await upcloudify.uploadVideo(files);
IMPORTANT NOTE: Secrets should be stored in enviroment variables or use secret managers if available
OPTIONS
Filters & Effects
Preview |
Usage |
![cloudinary options](https://camo.githubusercontent.com/d8dfd1a7264f0c62496b64b337f96f6112d498cc8f30fefae8e94b27b7f584f4/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f646969676b636336672f696d6167652f75706c6f61642f635f7363616c652c685f3330302c775f3430302f76313636393632393239312f66696c746572735f7138696667632e706e67) |
.applyFilter('aurora') |
![cloudinary options cartoonify](https://camo.githubusercontent.com/2d43b2f9e30ba4521d64b49df5bbbdba8f46090e856ab5078911d7d61fb34f1c/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f646969676b636336672f696d6167652f75706c6f61642f635f7363616c652c685f3330302c775f3430302f76313636393632393738352f636172746f6e6966795f766d327469372e706e67) |
.cartoonify() |
![cloudinary options opacity](https://camo.githubusercontent.com/55d165d4032d0ad2a95ca3725bc45dfdba097b3ba8c3dbcdf315cd08b3a4055b/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f646969676b636336672f696d6167652f75706c6f61642f635f63726f702c685f3330302c775f3430302f76313636393632393936362f6f7061636974795f69646371686d2e706e67) |
.opacity(30) |
![cloudinary options pixelate](https://camo.githubusercontent.com/3cd5e2286e1a91deeee7675aeeb6b30163fa98a5cf47a6530117cd900f389469/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f646969676b636336672f696d6167652f75706c6f61642f635f63726f702c685f3330302c775f3430302f76313636393633303133322f706978656c6174655f7762646461372e706e67) |
.pixelate(20) |
![cloudinary options gradient](https://camo.githubusercontent.com/ab3c20a60e3d0b25887846c46115f5976da4bb638c2c2b30404e013127d1f572/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f646969676b636336672f696d6167652f75706c6f61642f635f63726f702c675f6175746f2c685f3330302c775f3430302f76313636393633303238312f6772616469656e745f666164655f6c656c6a62722e706e67) |
.gradient() |
![cloudinary options border](https://camo.githubusercontent.com/bab24b525f0265f57591827665e299da6f7004c1bdfbe16d81c014a7c719dbfc/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f646969676b636336672f696d6167652f75706c6f61642f635f6669742c685f3330302c775f3430302f76313636393633303434352f626f726465725f656a7633646a2e706e67) |
.border({ size, color }) |
![cloudinary options replace color](https://camo.githubusercontent.com/75fe5a1e5f6f10aec29efce9884a856af51dc73e683871eb96e094126a7ea071/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f646969676b636336672f696d6167652f75706c6f61642f635f6669742c685f3330302c775f3430302f76313636393633303932342f7265706c6163655f636f6c6f725f767661706d782e706e67) |
.replaceColor({ original, tolerance, newcolor }) |
![cloudinary options round](https://camo.githubusercontent.com/f493697d9381db5a7e34a422a8c1e5e04696e8866fd99d20be7f3938364e5a92/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f646969676b636336672f696d6167652f75706c6f61642f635f6669742c685f3330302c775f3430302f76313636393633313230352f726f7564696e675f76616c75655f7466617862742e706e67) |
.borderRadius({ crop, radius }) |
![cloudinary options round](https://camo.githubusercontent.com/5e6449541e26b017773aa22f49f21464cc2debcf9eab4d93369e492025ee12ed/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f64656d6f2f696d6167652f75706c6f61642f715f6175746f2c685f3330302c775f3430302c655f766563746f72697a652f646f63732f66727569742d7374616e642e6a7067) |
.vectorize({ crop, radius = "max" }) |
Image resizing and cropping
Preview |
Usage |
![cloudinary options](https://camo.githubusercontent.com/46abc9c240cf7064dde61cddb0ad42402406aca19e03380c8cbd13d66574c1ba/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f64656d6f2f696d6167652f75706c6f61642f635f7468756d622c675f666163652c685f3130302c775f3130302f646f63732f6d6f64656c2e6a7067) |
.resize({ height, width }) |
API
Key |
Type |
Usage |
Default |
files |
File [] |
files you want to upload to the cloud |
undefined |
isUniqueFilename |
boolean |
The uploaded file will have a unique name if set to true. |
true |
crop |
string |
fill, pad |
fill |
radius |
number or string |
1 to 100, "max" |
default |
height |
number |
No information given |
default |
width |
number |
No information given |
default |
Author
Kolya Nikolai Madridano
Support