As mentioned
Get one now
file:///var/mobile/Containers/Data/xxxx.jpg
The images that need to be added with this path are read into byte arrays and passed to the server. How should this be achieved?
PS:
Try using $http to read this file
$http.get('file:///var/mobile/Containers/Data/xxxx.jpg')
.success(function(response) {
alert(response);
});
I don’t know what the response read here is?
The following method can convert the requested image result into
blob
. As for how you want to use it afterwards, it’s up to youI only tried the method of serving images on the server. I don’t know if it will work if you load local images. Because of the
content-type
是image/png
in the response header of the server’s serve image, I don’t know what’s going on when loading local files