Created
September 24, 2014 18:15
-
-
Save takkkun/8d820c4d5bce4e712e70 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(['file-chunk'], function(FileChunk) { | |
var file = pickupFile(); | |
var fileChunk = new FileChunk(file); | |
var chunks = fileChunk.chop(4096); | |
// each: 各チャンクのpromiseのdoneを設定する | |
chunks.each(function(chunk) { | |
}); | |
// done: 各チャンクのpromiseを$.whenでまとめたpromiseのdoneを設定する | |
chunks.done(function() { | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment