diff options
author | Jose Antonio Marquez | 2012-02-07 12:06:21 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-07 12:06:21 -0800 |
commit | 111509d5cbbd54b11afbc49f7c78d0c0548bb617 (patch) | |
tree | efaa926a6ba63ce98904c3740498795a72f7abd9 /js/io/system/ninjalibrary.js | |
parent | c4c5a8b49bb26d6344edceba73834754bb9930cf (diff) | |
download | ninja-111509d5cbbd54b11afbc49f7c78d0c0548bb617.tar.gz |
Adding mime-type detection for new file
Diffstat (limited to 'js/io/system/ninjalibrary.js')
-rw-r--r-- | js/io/system/ninjalibrary.js | 4 |
1 files changed, 2 insertions, 2 deletions
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, { | |||
83 | //Checking for status | 83 | //Checking for status |
84 | if (xhr.readyState === 4) { //TODO: add check for mime type | 84 | if (xhr.readyState === 4) { //TODO: add check for mime type |
85 | //Creating new file from loaded content | 85 | //Creating new file from loaded content |
86 | this.chromeApi.fileNew('/'+tocopylibs[i].name+'/'+tocopylibs[i].file, xhr.response, 'text/plain'); | 86 | this.chromeApi.fileNew('/'+tocopylibs[i].name+'/'+tocopylibs[i].file, xhr.response); |
87 | } else { | 87 | } else { |
88 | //Error creating single file library | 88 | //Error creating single file library |
89 | } | 89 | } |
@@ -120,7 +120,7 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { | |||
120 | xhr.send(); | 120 | xhr.send(); |
121 | //Checking for status | 121 | //Checking for status |
122 | if (xhr.readyState === 4) { | 122 | if (xhr.readyState === 4) { |
123 | this.api.fileNew(this.local+'/'+this.files[i], xhr.response, 'text/plain', function (status) { | 123 | this.api.fileNew(this.local+'/'+this.files[i], xhr.response, function (status) { |
124 | if (status) { | 124 | if (status) { |
125 | this.filesCreated++; | 125 | this.filesCreated++; |
126 | } | 126 | } |