diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2011-04-17 01:17:34 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2011-04-17 01:17:34 +0200 |
commit | 8a5d1ffebe8eb077b43df042314013143698b499 (patch) | |
tree | d4a9f73fdc67523dc57295123248b4e8f9c15751 /lib/filestorage.php | |
parent | 85a6097c03abc8eb2b7a4e74a421c0da82297628 (diff) | |
download | nextcloud-server-8a5d1ffebe8eb077b43df042314013143698b499.tar.gz nextcloud-server-8a5d1ffebe8eb077b43df042314013143698b499.zip |
fix that might solve strange uploading issues
Diffstat (limited to 'lib/filestorage.php')
-rw-r--r-- | lib/filestorage.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/filestorage.php b/lib/filestorage.php index 799d07da9db..462cc402814 100644 --- a/lib/filestorage.php +++ b/lib/filestorage.php @@ -69,6 +69,7 @@ class OC_FILESTORAGE{ public function fopen($path,$mode){} public function toTmpFile($path){}//copy the file to a temporary file, used for cross-storage file actions public function fromTmpFile($tmpPath,$path){}//copy a file from a temporary file, used for cross-storage file actions + public function fromUploadedFile($tmpPath,$path){}//copy a file from a temporary file, used for cross-storage file actions public function getMimeType($path){} public function delTree($path){} public function find($path){} @@ -388,6 +389,17 @@ die( "oh nooo!" ); return false; } } + + public function fromUploadedFile($tmpFile,$path){ + $fileStats = stat($tmpFile); + if(move_uploaded_file($tmpFile,$this->datadir.$path)){ + touch($this->datadir.$path, $fileStats['mtime'], $fileStats['atime']); + $this->notifyObservers($path,OC_FILEACTION_CREATE); + return true; + }else{ + return false; + } + } public function delTree($dir) { $dirRelative=$dir; |