I'm taking the picture from android and sending via PHP web services.
I'm using this code:-
<?php
//creating mongodb database connection
$m = new MongoClient();
$db = $m->companydb;
$grid= $db->getGridFS('myGrid');
//creating for request
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
    $pic = $_POST['image'];
    //uploading in mongodb database
    // we are getting error in this line -->This function work properly when              
    we are taking image from html file and use this command
    //storeUpload('image'); but in this file first we are string in a variable         
    and then passing this variable using storeUpload function 
    // maybe thats why we are geeting this issue
    $grid->storeUpload($pic);
    echo "Successfully Uploaded";
} 
else{
    echo "please check the REQUEST_METHOD"; 
}
?>
Can anybody please tell me how to upload it.
 
     
     
    