Last active
December 6, 2016 20:49
-
-
Save newvertex/0dc01c682f8d2425f6806298f0f02a28 to your computer and use it in GitHub Desktop.
A simple example of using image-uploader.js to upload from url
This file contains hidden or 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
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