Skip to content

Instantly share code, notes, and snippets.

@brendanashworth
Created August 5, 2016 05:33
Show Gist options
  • Save brendanashworth/2cd3ef01a93a0201155cd7c6a96c11c2 to your computer and use it in GitHub Desktop.
Save brendanashworth/2cd3ef01a93a0201155cd7c6a96c11c2 to your computer and use it in GitHub Desktop.
minio with wkhtmltopdf
const Minio = require('minio')
var client = new Minio({ ... })
// Create the stream.
let stream = wkhtmltopdf('http://google.com/', { pageSize: 'letter' })
// Upload it into minio.
client.putObject('bucket', 'google-page', stream, /* size of pdf */, (err, etag) => {
if (err) throw err
// google.com is now in minio
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment