Promise based write/getBuffer
See original GitHub issueCurrently, write needs callback. I’d like to be able to do this:
image.getBuffer(Jimp.MIME_JPEG).then(function(buffer) {
res.writeHead(200, {
'Content-Type': Jimp.MIME_JPEG,
'Content-Length': buffer.length
});
res.end(buffer);
})
Issue Analytics
- State:
- Created 8 years ago
- Reactions:29
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Using JavaScript Promises - AWS Documentation
promise method provides a way to call a service operation and manage asynchronous flow instead of using callbacks. In Node.js and browser scripts,...
Read more >golang s3 download to buffer using s3manager.downloader
It downloads to a file. How do I get the download content into a []byte slice (buffer) directly. I tried something like: var...
Read more >Using JavaScript Promises - Amazon SDK for JavaScript
Use JavaScript promises for asynchronous calls with the SDK for JavaScript. ... Key: 'example2.txt', Body: 'Uploaded text using the promise-based method!
Read more >How to implement a promise-based API - MDN Web Docs
This is a much less common task than using promise-based APIs, but it's still worth knowing about. Prerequisites: Basic computer literacy, a ...
Read more >promise-buffer - npm
Buffers promises and run them in order on the next tick. Installation. promise-buffer can be installed using. $ npm install --save promise- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As a workaround for the time being, using Bluebird promisify:
@efernandesng, thanks and apologies for delay getting back. I’ll look into this for the release after next.