Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Examples: Avoid PHP notice in upload.php.

  • Loading branch information...
commit b64e047261bac8059ea6fa9d9529bc71cadea211 1 parent 1fe3e90
@jayarjo jayarjo authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 examples/upload.php
View
4 examples/upload.php
@@ -34,10 +34,10 @@
@mkdir($targetDir);
}
-$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
+$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : uniqid("file_");
$filePath = $targetDir . DIRECTORY_SEPARATOR . $fileName;
-$chunking = is_numeric($_REQUEST["offset"]) && is_numeric($_REQUEST["total"]);
+$chunking = isset($_REQUEST["offset"]) && isset($_REQUEST["total"]);
// Remove old temp files
Please sign in to comment.
Something went wrong with that request. Please try again.