Created
January 2, 2019 08:13
-
-
Save mhemrg/b0120c73418cc6a3e382843157bae298 to your computer and use it in GitHub Desktop.
Upload an stream to Liara Object Storage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const fileContents = fs.createReadStream('./cat.png'); | |
liaraClient.putObject('photos', '/cat.png', fileContents) | |
.then(result => console.log('Successfully uploaded.')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment