So I have a webcam widget to take snapshots from guests. My guest table have an image field and I want to store this pic on it. I tried storing raw binary data, base64 encoded data and it didn't works. I don't know if database is receiving correct data or if I don't dealing with returned data well. I'm using PDO in my app and I've read on the web that it can have an issue with data larger than 64 kb, anyone knows if it's true?
This is how I got the image data from the webcam:
$imagem = file_get_contents('php://input');
Like I said above I tried to store image's pure data $imagem and then this way:
$data = @unpack("H*hex", $imagem);
$imagem_bd='0x'.$data['hex'];
And for both of that I've tried encoding with base64 too, but none worked.
Just for information: This app I'm working is a remake of another similar app that have this feature too, but on this old app I's used TSQL and it works fine.
Thanks in adv.
EDIT
For now I have done the insert well, but I can't retrieve and render the image at the browser.