summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorRobin <robin@Amaya.(none)>2010-05-08 21:32:20 +0200
committerRobin <robin@Amaya.(none)>2010-05-08 21:32:20 +0200
commit51b253447d4aa6d10a3870e94b9a2288278e1916 (patch)
treebb6737a66c2883a59e85f7fac796cc844641a4fe /files
parent565410d8e266b4d0391b10d15339f700dcb1f789 (diff)
downloadnextcloud-server-51b253447d4aa6d10a3870e94b9a2288278e1916.tar.gz
nextcloud-server-51b253447d4aa6d10a3870e94b9a2288278e1916.zip
provide option for automatic backup
Diffstat (limited to 'files')
-rwxr-xr-xfiles/upload.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/upload.php b/files/upload.php
index 0aa435cad6f..1190b466eac 100755
--- a/files/upload.php
+++ b/files/upload.php
@@ -26,9 +26,9 @@ require_once('../inc/lib_base.php');
$fileName=$_FILES['file']['name'];
$source=$_FILES['file']['tmp_name'];
-$target=$CONFIG_DATADIRECTORY.'/'.$_GET['dir'].'/'.$fileName;
+$target=$_GET['dir'].'/'.$fileName;
if(isset($_SESSION['username']) and $_SESSION['username'] and strpos($_GET['dir'],'..')===false){
- if(move_uploaded_file($source,$target)){
+ if(OC_FILESYSTEM::fromTmpFile($source,$target)){
echo 'true';
}else{
echo 'false';