Всем доброго дня! Нужна помощь! Хочу передать файл с ПК на ESP сервер Со стороны страницы выбираю файл и отправляю его на сервер ESP по websocket HTML: //*** websocket Setup *** var connection; connection = new WebSocket('ws://' + window.location.hostname + ':81/'); connection.onmessage = function (e) { //............... } //*** websocket Setup End *** Button4.onclick = function(e) { var input = document.createElement('input'); input.type = 'file'; var reader = new FileReader(); input.onchange = e => { var fileUp = e.target.files[0]; let fileLen=fileUp.size; reader.readAsArrayBuffer(fileUp); reader.onload = function loaded(evt) { var binaryString = evt.target.result; connection.send(binaryString); } } input.click(); } На стороне ESP Код (C++): void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t length) { Serial.print("WStype = "); Serial.println(type); Serial.print("WS payload = "); for(int i = 0; i < length; i++) { Serial.print((char) payload); } Serial.println(); } На мониторе порта вижу WStype = 1 WS payload = [0] Disconnected! Т.е. ни чего не передано, соединение закрыто Перелопатил массу сайтов, не помогло Подскажите что не так делаю