Smarter upload recovery #86

Merged
merged 2 commits into from Apr 19, 2013

Conversation

Projects
None yet
2 participants

Store read position to resume aborted upload at this point, read X-Last-Known-Byte on success to move read pointer

@RubaXa RubaXa and 1 other commented on an outdated diff Apr 17, 2013

lib/FileAPI.XHR.js
@@ -193,10 +194,10 @@
options.pause(data.file, options);
// smart restart if server reports about the last known byte
- var lkb = xhr.getResponseHeader('X-Last-Known-Byte');
+ var lkb = parseInt(xhr.getResponseHeader('X-Last-Known-Byte'));
@RubaXa

RubaXa Apr 17, 2013

Contributor

FF 19: parseInt("08") === 0

@wingedfox

wingedfox Apr 19, 2013

Добавил радикс

@RubaXa RubaXa added a commit that referenced this pull request Apr 19, 2013

@RubaXa RubaXa Merge pull request #86 from wingedfox/master
Smarter upload recovery
4743127

@RubaXa RubaXa merged commit 4743127 into mailru:dev Apr 19, 2013

@RubaXa RubaXa added a commit that referenced this pull request Apr 20, 2013

@RubaXa RubaXa #86: Smarter upload recovery b763df6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment