The community forums are in BETA and closed to the public.

Pass image from one canvas to the to other

I am implementing a program that when the user uploads an image to a canvas it gets uploaded to the other canvas as well. I think the way it should be done is with toDataURLto get the data from the one canvas and pass from rtc data channel to the others. An example would be of great help I am using as a basis the example found here

If you just want to pass an image from one client to another (canvas or not):

  • The image owner upload the image to a distributed, hosted file system like Amazon S3
  • The resulting URL for that upload can be published on a channel.subscriber
  • Subscribers of that channel will receive the URL and use it to download that image and display it (on your canvas or whatever)

This is very fast and reliable and implemented by many of our customers already.

The alternative is to break the file into multiple parts (if it is > 32KB in size) and publish each part and reassemble on the subscriber side. I recommend against this though as it will be slower, cost you more in messages and will be more error prone.

Hello. So you mean that a client has to go on amazon s3, upload his image, get the url and put it into a textbox on the app and then the others download it through the link and put it into the canvas?

You wouldn't necessarily need to have the user put it in a text box. You can publish the link automatically within the application.

Comments to this discussion are now closed!