Commit 3a2a5331 authored by Romain Courteaud's avatar Romain Courteaud

[indexeddb] Fix getAttachment with huge blob

The array buffer length was higher than what is stored in indexedDB
parent 56f2c38f
......@@ -474,8 +474,7 @@
var index = parseInt(
cursor.primaryKey.slice(key_path.length + 1),
10
),
i;
);
if ((start !== 0) && (index < start_index)) {
// No need to fetch blobs at the start
......@@ -486,12 +485,6 @@
return;
}
i = index - start_index;
// Extend array size
while (i > promise_list.length) {
promise_list.push(null);
i -= 1;
}
// Sort the blob by their index
promise_list.splice(
index - start_index,
......@@ -548,13 +541,8 @@
var index = parseInt(
cursor.primaryKey.slice(key_path.length + 1),
10
),
i = index;
// Extend array size
while (i > array_buffer_list.length) {
array_buffer_list.push(null);
i -= 1;
}
);
// Sort the blob by their index
array_buffer_list.splice(
index,
......
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