Skip to content

Instantly share code, notes, and snippets.

@newvertex
Last active December 6, 2016 20:49
Show Gist options
  • Save newvertex/0dc01c682f8d2425f6806298f0f02a28 to your computer and use it in GitHub Desktop.
Save newvertex/0dc01c682f8d2425f6806298f0f02a28 to your computer and use it in GitHub Desktop.
A simple example of using image-uploader.js to upload from url
let fileLink = 'http://.....' // a valid image file link
imageUploader.uploadIt(fileLink)
.then((jsonResult) => {
console.log(`Image link is:\n ${jsonResult.data.link}`);
}).catch((err) => {
console.log(`Error on uploading image:\n ${err.message}\ntry again later`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment