Skip to content

Commit 671919f

Browse files
author
Daniel Neto
committed
Add debug logging for file upload process and clean up whitespace
1 parent 4fc2cca commit 671919f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

view/jquery-file-upload/server/php/UploadHandler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,9 +1149,11 @@ protected function handle_file_upload($uploaded_file, $name, $size, $type, $erro
11491149
$file_path = $this->get_upload_path($file->name);
11501150
$append_file = $content_range && is_file($file_path) &&
11511151
$file->size > $this->get_file_size($file_path);
1152+
error_log("DEBUG: Trying to move file to {$file_path}");
11521153
if ($uploaded_file && is_uploaded_file($uploaded_file)) {
11531154
// multipart/formdata uploads (POST method uploads)
11541155
if ($append_file) {
1156+
error_log("DEBUG: Appending to file");
11551157
file_put_contents(
11561158
$file_path,
11571159
fopen($uploaded_file, 'r'),
@@ -1343,7 +1345,7 @@ public function generate_response($content, $print_response = true) {
13431345
if(!empty($post)){
13441346
$redirect = stripslashes($post);
13451347
}
1346-
1348+
13471349
if ($redirect && preg_match($this->options['redirect_allow_target'], $redirect)) {
13481350
return $this->header('Location: '.sprintf($redirect, rawurlencode($json)));
13491351
}

0 commit comments

Comments
 (0)