Skip to content
Snippets Groups Projects
Commit d5055639 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #15 from scambra/delete-fixes

use post to delete files, get has a limit and fails with many files
parents ac69974d 1b411df8
No related branches found
No related tags found
No related merge requests found
......@@ -7,15 +7,15 @@ OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
// Get data
$dir = stripslashes($_GET["dir"]);
$files = isset($_GET["file"]) ? stripslashes($_GET["file"]) : stripslashes($_GET["files"]);
$dir = stripslashes($_POST["dir"]);
$files = isset($_POST["file"]) ? stripslashes($_POST["file"]) : stripslashes($_POST["files"]);
$files = explode(';', $files);
$filesWithError = '';
$success = true;
//Now delete
foreach($files as $file) {
if( !OC_Files::delete( $dir, $file )) {
if( !OC_Files::delete( $dir, $file )) {
$filesWithError .= $file . "\n";
$success = false;
}
......
......@@ -281,6 +281,7 @@ var FileList={
$.ajax({
url: OC.filePath('files', 'ajax', 'delete.php'),
async:!sync,
type:'post',
data: {dir:$('#dir').val(),files:fileNames},
complete: function(data){
boolOperationFinished(data, function(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment