private function validateExtension(UploadedFile $uploadedFile) {
        $pathInfo = pathinfo($uploadedFile->getName());
        if(!isset($pathInfo['extension'])) {
            throw new Exception('No Extension Found(' . $uploadedFile->getName() . ')', 401);
        }
        $extension = strtolower($pathInfo['extension']);
        if(!in_array($extension, $this->getAllowedExtensions())) {
            throw new Exception('Invalid Type of File Uploaded, valid types: ' . implode(', ', $this->getAllowedExtensions()), 401);
        }
    }