Fixed big files upload

Closes #339
This commit is contained in:
Igor Zhukov 2014-06-23 16:01:33 +04:00
parent 5e4b41068d
commit 9fda274d3b

View File

@ -535,9 +535,10 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto'])
return;
}
var apiCurPromise = apiUploadPromise = apiUploadPromise.then(function () {
return MtpApiManager.invokeApi('upload.saveFilePart', {
return MtpApiManager.invokeApi(isBigFile ? 'upload.saveBigFilePart' : 'upload.saveFilePart', {
file_id: fileID,
file_part: part,
file_total_parts: totalParts,
bytes: bytesFromArrayBuffer(e.target.result)
}, {
startMaxLength: partSize + 256,