Giter Club home page Giter Club logo

thumbnailer's Introduction

Thumbnailer

A thumbnail generator example using Minio's listenBucketNotification API. This is a simple example of how one can build a AWS Lambda like functionality on a laptop.

Dependencies

Dependencies are managed by npm use npm install.

npm install

Configure

Please edit config/development.json with your local parameters, currently the example points to https://play.minio.io:9000

This example works only with Minio server using an extended API

Run

Once configured proceed to run.

node thumbnail.js
Listening for events on "images"

Now upload an image using mc

mc cp ./toposort/graph.jpg play/images/
./toposort/graph.jpg:  34.29 KB / 34.29 KB ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃ 100.00% 386.91 KB/s 0s

You will see thumbnail being generated after uploading the image using mc.

node thumbnail.js
Listening for events on "images"
Uploading new thumbail to "images-processed"
Successfully generated "graph-thumbnail.jpg" with md5sum "ca78ee1cc48358b4dbd883a589523e54"

To validate if the thumbnail was created at destination bucket use mc.

mc ls play/images-processed
[2017-01-22 23:44:51 PST]   629B graph-thumbnail.jpg

thumbnailer's People

Contributors

harshavardhana avatar dependabot[bot] avatar kanagarajkm avatar kiina avatar kannappanr avatar poornas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.