docs: def validate_upload_file(ctx, opts, owner, repo, filepath, skip_errors):
      """Validate parameters for requesting a file upload."""
      filename = click.format_filename(filepath)
      basename = os.path.basename(filename)
  
      click.echo(
          "Checking %(filename)s file upload parameters ... "
          % {"filename": click.style(basename, bold=True)},
          nl=False,
      )
  
      context_msg = "Failed to validate upload parameters!"
      with handle_api_exceptions(
          ctx, opts=opts, context_msg=context_msg, reraise_on_error=skip_errors
      ):
          with maybe_spinner(opts):
              md5_checksum = validate_request_file_upload(
                  owner=owner, repo=repo, filepath=filename
              )
  
      click.secho("OK", fg="green")
  
      return md5_checksum