I used canvas to do the picture editing function, because I chose canvas.toDataURL ("image/png") to upload the original image. Now I get the picture in base64 format. When I send it with websocket, I find that the file will be disconnected and report error 1009, which seems to be limited to 1024 characters before it can be sent.
some people say that the data is split and transmitted in segments, but they don"t know what to do with it. Ask for advice
const message = {
message: {
base64Img:"data:image/png;base64,iVBORw0K..."//10w+
},
}
websocket.send(JSON.stringify(message));