dsuryd / dotNetify

Simple, lightweight, yet powerful way to build real-time web apps.
https://dotnetify.net
Other
1.17k stars 164 forks source link

Issue on sending byte[] ? #209

Closed roozbehid-ic closed 5 years ago

roozbehid-ic commented 5 years ago

I am sending byte[] property back and forth and the data is not same.... Is this a known thing? Should I do utf8 encoding or some other work arounds?

dsuryd commented 5 years ago

I've not worked with bytes. The closest I've tried is sending images but always converted to base64. Check SignalR documentation if they support it.

roozbehid-ic commented 5 years ago

Couldnt find more info on SignalR but for future visitors there is an issue if you use "byte[]", it is better to switch to "string" on your server and do Base64 encoding of bytes and on the client use "atob" and charCodeAt to extract bytes.