Save image to dropbox with data from canvas
I'm trying to write canvas data as an image (png) to my dropbox. I manage to get the data from canvas and to save a file to dropbox, but the file is not an image file it seams. According to the documentation the image data should be converted to a arrayBuffer. That I'm doing using a function found here on Stackoverflow but something doesn't seem to work. Does anyone know what I'm doing wrong? function _str2ab(str) { var buf = new ArrayBuffer(str.length*2); // 2 bytes for each char var bufView = new Uint16Array(buf); for (var i=0, strLen=str.length; i<strLen; i++) { bufView[i] = str.charCodeAt