# 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:9000
<blockquote>This example works only with Minio server using an extended API</blockquote>
## 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
```
生物医药从业者
- 粉丝: 23
- 资源: 4616
最新资源
- YOLO-yolo资源
- 适用于 Java 项目的 Squash 客户端库 .zip
- 适用于 Java 的 Chef 食谱.zip
- Simulink仿真快速入门与实践基础教程
- js-leetcode题解之179-largest-number.js
- js-leetcode题解之174-dungeon-game.js
- Matlab工具箱使用与实践基础教程
- js-leetcode题解之173-binary-search-tree-iterator.js
- js-leetcode题解之172-factorial-trailing-zeroes.js
- js-leetcode题解之171-excel-sheet-column-number.js
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈