diff --git a/src/web/uploads.php b/src/web/uploads.php index b3ef4c7..5267339 100644 --- a/src/web/uploads.php +++ b/src/web/uploads.php @@ -44,16 +44,16 @@ class uploads { return self::$_files; } - static function get(string $pkey, bool $required=true): Upload { + static function get(string $pkey, bool $required=true, bool $check=true): Upload { $_files = self::_files(); - return new Upload(cl::pget($_files, $pkey)); + return new Upload(cl::pget($_files, $pkey), $required, $check); } - static function all(string $pkey) { + static function all(string $pkey, bool $required=true, bool $check=true) { $_files = self::_files(); $uploads = []; foreach (cl::pget($_files, $pkey) as $file) { - $uploads[] = new Upload($file); + $uploads[] = new Upload($file, $required, $check); } return $uploads; }