code: func (c *Client) UploadFile(ctx context.Context, file string, u *url.URL, param *Upload) error {
  	if param == nil {
  		p := DefaultUpload // Copy since we set ContentLength
  		param = &p
  	}
  
  	s, err := os.Stat(file)
  	if err != nil {
  		return err
  	}
  
  	f, err := os.Open(filepath.Clean(file))
  	if err != nil {
  		return err
  	}
  	defer f.Close()
  
  	param.ContentLength = s.Size()
  
  	return c.Upload(ctx, f, u, param)
  }
docs: // UploadFile PUTs the local file to the given URL