From 111509d5cbbd54b11afbc49f7c78d0c0548bb617 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Tue, 7 Feb 2012 12:06:21 -0800 Subject: Adding mime-type detection for new file --- js/io/system/ninjalibrary.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/io/system/ninjalibrary.js') diff --git a/js/io/system/ninjalibrary.js b/js/io/system/ninjalibrary.js index 09cf7407..658ce589 100644 --- a/js/io/system/ninjalibrary.js +++ b/js/io/system/ninjalibrary.js @@ -83,7 +83,7 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { //Checking for status if (xhr.readyState === 4) { //TODO: add check for mime type //Creating new file from loaded content - this.chromeApi.fileNew('/'+tocopylibs[i].name+'/'+tocopylibs[i].file, xhr.response, 'text/plain'); + this.chromeApi.fileNew('/'+tocopylibs[i].name+'/'+tocopylibs[i].file, xhr.response); } else { //Error creating single file library } @@ -120,7 +120,7 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { xhr.send(); //Checking for status if (xhr.readyState === 4) { - this.api.fileNew(this.local+'/'+this.files[i], xhr.response, 'text/plain', function (status) { + this.api.fileNew(this.local+'/'+this.files[i], xhr.response, function (status) { if (status) { this.filesCreated++; } -- cgit v1.2.3