diff options
author | Luke Policinski <lpolicinski@gmail.com> | 2014-02-19 21:23:39 +0000 |
---|---|---|
committer | Luke Policinski <lpolicinski@gmail.com> | 2014-02-19 21:23:39 +0000 |
commit | 79a6d89bccf4c5d4ce934c88bc544988c47b8e98 (patch) | |
tree | f368fc7893294e023bbefae1c0e8ae961cc48217 /lib/private/files | |
parent | a4f71267f0c7ef7a2a8d23ac0a47279ed8bdda5e (diff) | |
download | nextcloud-server-79a6d89bccf4c5d4ce934c88bc544988c47b8e98.tar.gz nextcloud-server-79a6d89bccf4c5d4ce934c88bc544988c47b8e98.zip |
Feature Added : Ability to drag and drop in Chrome
Diffstat (limited to 'lib/private/files')
-rw-r--r-- | lib/private/files/view.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 530aa8f7514..7977272ee1f 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -617,10 +617,21 @@ class View { } public function fromTmpFile($tmpFile, $path) { + if (Filesystem::isValidPath($path)) { + + // Get directory that the file is going into + $file_path = \OC_User::getHome(\OC_User::getUser()) . '/files'.substr($path, 0, strrpos($path,'/')); + + // Create the directories if any + if(empty($file_path) === false) { + mkdir($file_path, 0770, true); + } + if (!$tmpFile) { debug_print_backtrace(); } + $source = fopen($tmpFile, 'r'); if ($source) { $this->file_put_contents($path, $source); |