0

I guess the question will be enough, but here's some extra information.

I want to take a picture using HTML5 API and save it into a Canvas. Then, I want to take that picture and post it in the server in a folder. The application is that I'm adding a user to my system and I want to make a picture of him, and save it in the server for obvious reasons to use it in the future.

I'm playing with some tutorials even here but nothing has been useful for me.

I already took the picture and save it in the Canvas. I just want to be able to get that content to the server.

danivega
  • 35
  • 1
  • 1
  • 5
  • Where did you get the image from? Saving content from a canvas could be a pain in the *** because of the some origin policy. Do you load the image from your own server? – Philip G Feb 14 '14 at 16:48
  • http://stackoverflow.com/questions/1590965/uploading-canvas-image-data-to-the-server – RyanS Feb 14 '14 at 16:50
  • @Philip G the picture is coming from client-side camera input. http://www.w3.org/TR/html-media-capture/ – ElefantPhace Feb 14 '14 at 17:12
  • I successfully done this! Thanks I'll upload the solution – danivega Feb 14 '14 at 17:41

1 Answers1

0

Canvas content can't be returned if the canvas has been tainted.

A canvas gets tainted when a resource is loaded from a origin that's not from your own domain. Local files from client is not from your domain. Hence the canvas gets tainted!

Philip G
  • 4,098
  • 2
  • 22
  • 41