Check format of chunked filename

This commit is contained in:
Bart Visscher 2012-09-17 17:34:49 +02:00
parent b04c7175dc
commit b1bab6d113
1 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,9 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
public function createFile($name, $data = null) {
if (isset($_SERVER['HTTP_OC_CHUNKED'])) {
$info = OC_FileChunking::decodeName($name);
if (empty($info)) {
throw new Sabre_DAV_Exception_NotImplemented();
}
$chunk_handler = new OC_FileChunking($info);
$chunk_handler->store($info['index'], $data);
if ($chunk_handler->isComplete()) {