Commit 1a6a0a32 authored by Tristan Cavelier's avatar Tristan Cavelier

splitstorage.js getAttachment no response fixed

parent d3d10cfe
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
*/ */
/*jslint indent:2, maxlen: 80, nomen: true */ /*jslint indent:2, maxlen: 80, nomen: true */
/*global jIO, define */ /*global jIO, define, Blob */
/** /**
* Provides a split storage for JIO. This storage splits data * Provides a split storage for JIO. This storage splits data
...@@ -462,17 +462,15 @@ ...@@ -462,17 +462,15 @@
err, err,
response response
) { ) {
var i, doc;
if (err) { if (err) {
err.message = "Unable to get attachment"; err.message = "Unable to get attachment";
delete err.index; delete err.index;
return command.error(err); return command.error(err);
} }
doc = '';
for (i = 0; i < response.length; i += 1) { command.success({"data": new Blob(response.map(function (answer) {
doc += response[i].data; return answer.data;
} }), {"type": response[0].data.type})});
that.success({"data": doc}); // XXX get mimetype
}); });
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment