@koalaranger/upcloudify

1.3.5 • Public • Published

Upcloudify (Development) · NPM Version

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

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 .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

Author

Kolya Nikolai Madridano

Support

buy-me-a-coffee ko-fi paypal

Package Sidebar

Install

npm i @koalaranger/upcloudify

Weekly Downloads

4

Version

1.3.5

License

MIT

Unpacked Size

19 kB

Total Files

9

Last publish

Collaborators

  • koalaintrees