SignalR Instant File Upload
-
I've always thought that SignalR does not support the transfer of binary data and although one can convert an image into a base64 string and send it, Websocket which SignalR uses, has a size limit of 64K. So every post online related to sending an image via SignalR says it cannot be done and that Web API should be used instead for that purpose. Having said all that, I came across a Youtube video which shows a person uploading an image in one browser and then instantaneously displaying it in another browser. Can someone explain how this can be possible
-
I've always thought that SignalR does not support the transfer of binary data and although one can convert an image into a base64 string and send it, Websocket which SignalR uses, has a size limit of 64K. So every post online related to sending an image via SignalR says it cannot be done and that Web API should be used instead for that purpose. Having said all that, I came across a Youtube video which shows a person uploading an image in one browser and then instantaneously displaying it in another browser. Can someone explain how this can be possible
Did the Youtube video explicitly state that they were using SignalR to accomplish this particular feature?
This space for rent
-
I've always thought that SignalR does not support the transfer of binary data and although one can convert an image into a base64 string and send it, Websocket which SignalR uses, has a size limit of 64K. So every post online related to sending an image via SignalR says it cannot be done and that Web API should be used instead for that purpose. Having said all that, I came across a Youtube video which shows a person uploading an image in one browser and then instantaneously displaying it in another browser. Can someone explain how this can be possible
Liagapi wrote:
Can someone explain how this can be possible
Magic. Pixies. Video editing. Other. Since we have no idea what video you are talking about - and it's not a good idea to post youtube links here - we are hardly likely to know exactly what they did. The best person to ask is the person who made the video - I'm pretty sure that YouTube lets you comment on videos at the bottom of the page...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
-
I've always thought that SignalR does not support the transfer of binary data and although one can convert an image into a base64 string and send it, Websocket which SignalR uses, has a size limit of 64K. So every post online related to sending an image via SignalR says it cannot be done and that Web API should be used instead for that purpose. Having said all that, I came across a Youtube video which shows a person uploading an image in one browser and then instantaneously displaying it in another browser. Can someone explain how this can be possible
I have no idea what video you're talking about, but based on your description and SignalR limitations, there are TWO channels at work here. The first is a normal upload of an image file by the browser to a web server, either through a web service, web api, POST, whatever. The server then sends a message to another SignalR client to tell it to download the image from the server using a specific URL. The image is NOT transferred via SignalR, but the messaging the tell the clients that an image was updated is.
System.ItDidntWorkException: Something didn't work as expected. A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave Kreskowiak -
Did the Youtube video explicitly state that they were using SignalR to accomplish this particular feature?
This space for rent
-
Hi Pete, yes the video description did say that SignalR was used but the video only shows the uploading and displaying of images but no code was shown. The name of the video is
Real Time Image Uploading No Coding - SignalR
It doesn't say what version of SignalR that person was using. The size limitation was introduced around about SignalR 2. You might be able to work around this by falling the connection back to HTTP Long Polling instead (you set that in the connection.start).
This space for rent