javascript - From arraybuffer to blob in Cordova -


i'm trying save locally (using localfilesystem) picture (i retrieve url xmlhttprequest) cordova. after investigation, have narrowed down problem 1 point: transforming arraybuffer blob. working chrome on windows (the xhr.responsetype being arraybuffer):

var blob = new blob([xhr.response], {type: 'image/jpeg'}); 

but it's not working cordova (2.9.0) on ios (xcode ios 6.1 simulator). idea?

i'm not sure blob available on cordova. can't find reference in official documentation, if forum discussions mention it. anyway, don't think cordova able save jpeg file using blob 2.9.0 version i'm using.

so have found alternative solution store locally file url, using filetransfer, github gists. adapted snippet have found here:

https://gist.github.com/nathanpc/2464060

so thank you, nathan...


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -