function _storeBinary($collection, $id, $field, $data) { loader_import('saf.File.Store'); $fs = new FileStore($this->filestore_path); $fs->autoInit = true; if ($fs->put($id . '_' . $field . '_' . $collection, $data) != strlen($data)) { $this->error = $fs->error; return false; } return true; }