Browse Source

Fixed big files upload

Closes #339
master
Igor Zhukov 11 years ago
parent
commit
9fda274d3b
  1. 3
      app/js/lib/mtproto_wrapper.js

3
app/js/lib/mtproto_wrapper.js

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

Loading…
Cancel
Save