public function deleteFileAndChunksById($id)
    {
        $this->filesCollection->deleteOne(['_id' => $id]);
        $this->chunksCollection->deleteMany(['files_id' => $id]);
    }
public function deleteFileAndChunksById($id)
    {
        $this->filesCollection->deleteOne(['_id' => $id]);
        $this->chunksCollection->deleteMany(['files_id' => $id]);
    }
public function deleteFileAndChunksById ( $ id ) { $ this -> filesCollection -> deleteOne ( [ '_id' => $ id ] ) ; $ this -> chunksCollection -> deleteMany ( [ 'files_id' => $ id ] ) ; }
Deletes a GridFS file and related chunks by ID.

@param mixed $id
Deletes a GridFS file and related chunks by ID .