Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/minio/thumbnailer
A thumbnail generator example using Minio's listenBucketNotification API
https://github.com/minio/thumbnailer
image-manipulation image-processing lambda lambda-functions minio s3-bucket
Last synced: 13 days ago
JSON representation
A thumbnail generator example using Minio's listenBucketNotification API
- Host: GitHub
- URL: https://github.com/minio/thumbnailer
- Owner: minio
- License: apache-2.0
- Archived: true
- Created: 2017-01-07T05:20:06.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-06-02T00:21:29.000Z (over 2 years ago)
- Last Synced: 2024-08-02T11:23:22.835Z (4 months ago)
- Topics: image-manipulation, image-processing, lambda, lambda-functions, minio, s3-bucket
- Language: JavaScript
- Homepage:
- Size: 68.4 KB
- Stars: 104
- Watchers: 10
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Thumbnailer
A thumbnail generator example using Minio's [listenBucketNotification API](http://docs.minio.io/docs/javascript-client-api-reference#listenBucketNotification). This is a simple example of how one can build a AWS Lambda like functionality on a laptop.## Dependencies
Dependencies are managed by [npm](https://npm.org) use `npm install`.```sh
npm install
```## Configure
Please edit `config/development.json` with your local parameters, currently the example points to https://play.minio.io:9000This example works only with Minio server using an extended API## Run
Once configured proceed to run.```sh
node thumbnail.js
Listening for events on "images"
```Now upload an image using `mc`
```sh
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`.
```sh
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`.
```sh
mc ls play/images-processed
[2017-01-22 23:44:51 PST] 629B graph-thumbnail.jpg
```