Aug 9, 2017 · 1 min read
Great article, really helpful in covering all the steps. A suggestion, you can make fetchImage more generic by reading the content type from the response.
var contentType = resp.headers(‘Content-Type’);
var file = new Blob([resp.data], {type: contentType});