Files: fix moving files by DnD
This commit is contained in:
parent
b471177439
commit
5417e44b2a
|
@ -17,8 +17,8 @@ if(\OC\Files\Filesystem::file_exists($target . '/' . $file)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($dir != '' || $file != 'Shared') {
|
if ($dir != '' || $file != 'Shared') {
|
||||||
$targetFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $file);
|
$targetFile = \OC\Files\Filesystem::normalizePath($target . '/' . $file);
|
||||||
$sourceFile = \OC\Files\Filesystem::normalizePath($target . '/' . $file);
|
$sourceFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $file);
|
||||||
if(\OC\Files\Filesystem::rename($sourceFile, $targetFile)) {
|
if(\OC\Files\Filesystem::rename($sourceFile, $targetFile)) {
|
||||||
OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $file )));
|
OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $file )));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -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');
|
Loading…
Reference in New Issue