summaryrefslogtreecommitdiffstats
path: root/files/ajax/upload.php
diff options
context:
space:
mode:
Diffstat (limited to 'files/ajax/upload.php')
-rw-r--r--files/ajax/upload.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/files/ajax/upload.php b/files/ajax/upload.php
index f47f9b3d282..5dcd2f2b6af 100644
--- a/files/ajax/upload.php
+++ b/files/ajax/upload.php
@@ -9,7 +9,7 @@ require_once('../../lib/base.php');
header( "Content-Type: text/plain" );
// Check if we are a user
-if( !OC_USER::isLoggedIn()){
+if( !OC_User::isLoggedIn()){
echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" )));
exit();
}
@@ -24,8 +24,8 @@ if(strpos($dir,'..') === false){
$fileCount=count($files['name']);
for($i=0;$i<$fileCount;$i++){
$target='/' . stripslashes($dir) . $files['name'][$i];
- if(OC_FILESYSTEM::fromUploadedFile($files['tmp_name'][$i],$target)){
- $result[]=array( "status" => "success", 'mime'=>OC_FILESYSTEM::getMimeType($target),'size'=>OC_FILESYSTEM::filesize($target),'name'=>$files['name'][$i]);
+ if(OC_Filesystem::fromUploadedFile($files['tmp_name'][$i],$target)){
+ $result[]=array( "status" => "success", 'mime'=>OC_Filesystem::getMimeType($target),'size'=>OC_Filesystem::filesize($target),'name'=>$files['name'][$i]);
}
}
echo json_encode($result);