diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-01-31 17:56:44 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-01-31 17:56:44 +0100 |
commit | 5417e44b2a6d03042156e002264525091f66a6ad (patch) | |
tree | 3673fcc596493235dd64aeb4f57cc9bf7df9f35d | |
parent | b471177439ec7550fecae61d6218ac456a6e208c (diff) | |
download | nextcloud-server-5417e44b2a6d03042156e002264525091f66a6ad.tar.gz nextcloud-server-5417e44b2a6d03042156e002264525091f66a6ad.zip |
Files: fix moving files by DnD
-rw-r--r-- | apps/files/ajax/move.php | 4 | ||||
-rw-r--r-- | apps/files/js/upload.js | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/apps/files/ajax/move.php b/apps/files/ajax/move.php index 99e43ed23be..78ed218c136 100644 --- a/apps/files/ajax/move.php +++ b/apps/files/ajax/move.php @@ -17,8 +17,8 @@ if(\OC\Files\Filesystem::file_exists($target . '/' . $file)) { } if ($dir != '' || $file != 'Shared') { - $targetFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $file); - $sourceFile = \OC\Files\Filesystem::normalizePath($target . '/' . $file); + $targetFile = \OC\Files\Filesystem::normalizePath($target . '/' . $file); + $sourceFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $file); if(\OC\Files\Filesystem::rename($sourceFile, $targetFile)) { OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $file ))); } else { diff --git a/apps/files/js/upload.js b/apps/files/js/upload.js new file mode 100644 index 00000000000..9d9f61f600e --- /dev/null +++ b/apps/files/js/upload.js @@ -0,0 +1,8 @@ +function Upload(fileSelector) { + if ($.support.xhrFileUpload) { + return new XHRUpload(fileSelector.target.files); + } else { + return new FormUpload(fileSelector); + } +} +Upload.target = OC.filePath('files', 'ajax', 'upload.php'); |