code: func (c *Client) NewUploadRequest(urlStr string, reader io.Reader, size int64, mediaType string) (*http.Request, error) {
  	if !strings.HasSuffix(c.UploadURL.Path, "/") {
  		return nil, fmt.Errorf("UploadURL must have a trailing slash, but %q does not", c.UploadURL)
  	}
  	u, err := c.UploadURL.Parse(urlStr)
  	if err != nil {
  		return nil, err
  	}
  
  	req, err := http.NewRequest("POST", u.String(), reader)
  	if err != nil {
  		return nil, err
  	}
  	req.ContentLength = size
  
  	if mediaType == "" {
  		mediaType = defaultMediaType
  	}
  	req.Header.Set("Content-Type", mediaType)
  	req.Header.Set("Accept", mediaTypeV3)
  	req.Header.Set("User-Agent", c.UserAgent)
  	return req, nil
  }
docs: // NewUploadRequest creates an upload request. A relative URL can be provided in
  // urlStr, in which case it is resolved relative to the UploadURL of the Client.
  // Relative URLs should always be specified without a preceding slash.