finally i currected the KContentType as "application/x-www-form-urlencoded" rather than image/jpeg(in the client side) .
but my task is to upload an image to the server i need to transfer the image through POST request.how can i do it?
at client side i am copying file to Descriptor and try to transfer that discriptor throug POST request
Code:
iPostDataImage = HBufC8::NewL(aSize+10) ;
TPtr8 aPtr = iPostDataImage->Des();
//Obviously we have to read in the data to the iPostDataImage (ray)
aFile.Read(0, aPtr, aSize);
aFile.Close() ;
aFs.Close() ;
CleanupStack::PopAndDestroy(&aFs) ;
but at server side
Code:
<?php
echo "ex1";
if(isset($_POST["photo"]) || isset($_REQUEST['photo']) || isset($_POST['photo']))
{
echo "ex2";
}
?>
<?php
$photo=$_POST["photo"];
$ourFileName = "jjjj.jpg";
$fh = fopen($ourFileName, 'w') or die("Can't open file");
fputs($fh,$photo,strlen($photo));
fclose($fh);
?>
i know i am wrong in some stages
can you please correct me
thanks