A tool that allows you to easily upload files to your cloud. It has a number of capabilities that are challenging to master through documentation alone.
npm install @koalaranger/upcloudifyupcloudify is a javascript package that allows you to easily upload files to your cloud.
Open your desired command line tool and run these commands
$ mkdir project_name
$ cd project_name
$ npm i @koalaranger/upcloudify
jsx
// 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 | .applyFilter('aurora')
!cloudinary options cartoonify | .cartoonify()
!cloudinary options opacity | .opacity(30)
!cloudinary options pixelate | .pixelate(20)
!cloudinary options gradient | .gradient()
!cloudinary options border | .border({ size, color })
!cloudinary options replace color | .replaceColor({ original, tolerance, newcolor })
!cloudinary options round | .borderRadius({ crop, radius })
!cloudinary options round | .vectorize({ crop, radius = "max" })
Image resizing and cropping
Preview | Usage
--- | ---
!cloudinary options | .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`