Hi,
I am currently very new to the use of nusoap.
I tried to send an image from the client doing this:
$file = "Foto.jpg";
if($fp = fopen($file,"rb", 0)){
$picture = fread($fp,filesize($file));
fclose($fp);
// base64 encode the binary data, then break it
// into chunks according to RFC 2045 semantics
$picture_base64 = chunk_split(base64_encode($picture));
}
|
But a echo '<img src="data:image/gif;base64,'.$picture_base64 .'">'; to test it, gives me only a half picture back?
Then on server side:
(very simple for testing)
function item_image($image){
if(!empty($image)){
$picture = base64_decode($image);
// copy locally
copy($picture, "bilder/img_".$l_id."");
return 1;
}else{
return 0;
}
}
|
But the picture never arrives.
Is there anybody outside having experience about transfering pictures?
A little help would be so great!
Thanks
Heohni