diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2012-04-15 16:59:39 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2012-04-15 17:00:49 +0200 |
commit | a0d917fe98efbb11905f7ddd12169e3675690555 (patch) | |
tree | ee8780be20f979c848e155412ed64c81367e826e /files | |
parent | 0b426b5e64eec4b255c1e767edb07e01160eb074 (diff) | |
download | nextcloud-server-a0d917fe98efbb11905f7ddd12169e3675690555.tar.gz nextcloud-server-a0d917fe98efbb11905f7ddd12169e3675690555.zip |
fixing oc-375 - a number is appended tp the filename
Diffstat (limited to 'files')
-rw-r--r-- | files/ajax/upload.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/files/ajax/upload.php b/files/ajax/upload.php index af7a7acf702..76ea65fe933 100644 --- a/files/ajax/upload.php +++ b/files/ajax/upload.php @@ -47,7 +47,8 @@ $result=array(); if(strpos($dir,'..') === false){ $fileCount=count($files['name']); for($i=0;$i<$fileCount;$i++){ - $target=stripslashes($dir) . $files['name'][$i]; + // $target=stripslashes($dir) . $files['name'][$i]; + $target = OC_Helper::buildNotExistingFileName(stripslashes($dir), $files['name'][$i]); if(is_uploaded_file($files['tmp_name'][$i]) and OC_Filesystem::fromTmpFile($files['tmp_name'][$i],$target)){ $meta=OC_FileCache::getCached($target); $result[]=array( "status" => "success", 'mime'=>$meta['mimetype'],'size'=>$meta['size'],'name'=>$files['name'][$i]); |