Commit cf81835f authored by Guillaume Royer's avatar Guillaume Royer

feat(node): add google drive storage

parent 784fe38f
......@@ -156,6 +156,7 @@ ${JIONODELATEST}: ${SRCDIR}/node/jio-start.js \
${SRCDIR}/jio.storage/documentstorage.js \
${SRCDIR}/jio.storage/dropboxstorage.js \
${SRCDIR}/jio.storage/erp5storage.js \
${SRCDIR}/jio.storage/gdrivestorage.js \
${SRCDIR}/jio.storage/mappingstorage.js \
${SRCDIR}/jio.storage/memorystorage.js \
${SRCDIR}/jio.storage/querystorage.js \
......
......@@ -70,15 +70,17 @@ function Blob(blobParts, options) {
buffers = [];
html5weakmap.set(this, priv);
for (i = 0; i < blobParts.length; ++i) {
if (Buffer.isBuffer(blobParts[i])) {
buffers.push(blobParts[i]);
} else if (blobParts[i] instanceof Blob) {
buffers.push(html5weakmap.get(blobParts[i]).data);
} else if (blobParts[i] instanceof ArrayBuffer) {
buffers.push(new Buffer(new Uint8Array(blobParts[i])));
} else {
buffers.push(new Buffer('' + blobParts[i]));
if (blobParts) {
for (i = 0; i < blobParts.length; ++i) {
if (Buffer.isBuffer(blobParts[i])) {
buffers.push(blobParts[i]);
} else if (blobParts[i] instanceof Blob) {
buffers.push(html5weakmap.get(blobParts[i]).data);
} else if (blobParts[i] instanceof ArrayBuffer) {
buffers.push(new Buffer(new Uint8Array(blobParts[i])));
} else {
buffers.push(new Buffer('' + blobParts[i]));
}
}
}
priv.data = Buffer.concat(buffers);
......
......@@ -27,6 +27,7 @@ testrunner.run({
tests: [
'test/jio.storage/dropboxstorage.tests.js',
'test/jio.storage/erp5storage.tests.js',
'test/jio.storage/gdrivestorage.tests.js',
'test/jio.storage/mappingstorage.tests.js',
'test/jio.storage/memorystorage.tests.js',
'test/jio.storage/querystorage.tests.js',
......
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