Download cross domain image in ionic


#1

I am trying to download an image that don’t support CORS, so $http.get(url) will fail.

i.e
XMLHttpRequest cannot load http://apod.nasa.gov/apod/image/1409/West-HSTtop100median.jpg. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://192.168.0.118:8100’ is therefore not allowed access.

Are there anyway to download this file into javascript string in base64? since it will be fine to use tag to load it.