From 91cab8f2a995e9c2d4b2c7f9b79d2727f3b0f5d8 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Russo Date: Tue, 31 Jul 2012 18:53:59 -0700 Subject: Fix: Replacing deprecated blobBuilder Fixes issues with copying library files from File System. Need to fix ArrayBuffer, but this is just a warning that does not break functionality. --- js/io/system/chromeapi.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'js/io/system') diff --git a/js/io/system/chromeapi.js b/js/io/system/chromeapi.js index e46894d3..e33406ee 100644 --- a/js/io/system/chromeapi.js +++ b/js/io/system/chromeapi.js @@ -96,7 +96,7 @@ exports.ChromeApi = Montage.create(Object.prototype, { // f.createWriter(function(writer) { // - var mime, blob = new window.WebKitBlobBuilder, type = filePath.split('.'); + var mime, blob, type = filePath.split('.'); type = type[type.length-1]; switch (type) { case 'bmp': @@ -137,8 +137,9 @@ exports.ChromeApi = Montage.create(Object.prototype, { break; } // - blob.append(content); - writer.write(blob.getBlob(mime)); + blob = new Blob([content], {type: type}); + // + writer.write(blob); // if (callback) callback(true); }, function (e) {if (callback) callback(false)}); -- cgit v1.2.3