--- docman.php 2000/12/21 07:30:04 1.25 +++ docman.php 2000/12/21 08:25:06 1.26 @@ -875,7 +875,7 @@ ////////////////////////////////////////////////////////////////// -function UploadPage($fsRoot, $relDir, $filename) { +function UploadPage($fsRoot, $relDir, $filename="") { $self = $GLOBALS["PHP_SELF"] ; if ($relDir == "") $relDir = "/" ; @@ -885,7 +885,7 @@
DESTINATION DIRECTORY: - +
DESTINATION FILE: @@ -1234,6 +1234,9 @@ // TODO : should rather check for escapeshellcmds // but maybe RFC 18xx asserts safe filenames .... $source = $FN ; + if (! file_exists($source)) { + Error("You must select file with browse to upload it!"); + } if (! isset($FILENAME)) { // from update file $target = "$fsDir/$FN_name" ; } else {