in this example "path" is path to (uploaded)temporary file in server? or file path in client's device? i'm reading files metadata from $_FILES but don't know where to read the file to store in db. please help. (sorry for my english)
<?php
// connect to the ‘myGrid’ GridFS
$m = new Mongo();
$db = $m->myDB;
$myGrid = $db->getGridFS('myGrid');
$some_file='path of your video or audio file';
// some extra data you may want to store with your file
$data_array = array(
'mime' => mime_content_type($some_file),
'timestamp' => time(),
);
// store a file into the GridFS
$myGrid->storeFile($some_file, $data_array);
?>