uploadProvider = $uploadProvider; } public function upload(): void { $key = (string) $this->post('key', ''); $red = (string) $this->post('red', 'RED'); $blu = (string) $this->post('blu', 'BLU'); $name = (string) $this->post('name', 'Unnamed'); $demo = $this->file('demo'); if (null === $demo) { echo 'No demo uploaded'; return; } $demoFile = $demo['tmp_name']; echo $this->uploadProvider->upload($key, $red, $blu, $name, $demoFile); } }