Fixed file send
This commit is contained in:
parent
6653fe7af8
commit
542affc671
@ -30,8 +30,6 @@ angular.module('izhukov.mtproto', ['izhukov.utils'])
|
|||||||
{id: 5, url: 'http://149.154.171.5'}
|
{id: 5, url: 'http://149.154.171.5'}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
var sslSubdomains = 'pluto,venus,aurora,vesta,flora';
|
|
||||||
|
|
||||||
var chosenServers = {};
|
var chosenServers = {};
|
||||||
|
|
||||||
function chooseServer(dcID) {
|
function chooseServer(dcID) {
|
||||||
|
@ -148,6 +148,9 @@ TLSerialization.prototype.storeString = function (s, field) {
|
|||||||
|
|
||||||
|
|
||||||
TLSerialization.prototype.storeBytes = function (bytes, field) {
|
TLSerialization.prototype.storeBytes = function (bytes, field) {
|
||||||
|
if (bytes instanceof ArrayBuffer) {
|
||||||
|
bytes = new Uint8Array(bytes);
|
||||||
|
}
|
||||||
this.debug && console.log('>>>', bytesToHex(bytes), (field || '') + ':bytes');
|
this.debug && console.log('>>>', bytesToHex(bytes), (field || '') + ':bytes');
|
||||||
|
|
||||||
var len = bytes.byteLength || bytes.length;
|
var len = bytes.byteLength || bytes.length;
|
||||||
@ -160,6 +163,7 @@ TLSerialization.prototype.storeBytes = function (bytes, field) {
|
|||||||
this.byteView[this.offset++] = (len & 0xFF00) >> 8;
|
this.byteView[this.offset++] = (len & 0xFF00) >> 8;
|
||||||
this.byteView[this.offset++] = (len & 0xFF0000) >> 16;
|
this.byteView[this.offset++] = (len & 0xFF0000) >> 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.byteView.set(bytes, this.offset);
|
this.byteView.set(bytes, this.offset);
|
||||||
this.offset += len;
|
this.offset += len;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user