code: func Upload(ctx *context.Context, puts []config.Put, kind string, check ResponseChecker) error {
  	if ctx.SkipPublish {
  		return pipe.ErrSkipPublishEnabled
  	}
  
  	// Handle every configured put
  	for _, put := range puts {
  		put := put
  		filters := []artifact.Filter{}
  		if put.Checksum {
  			filters = append(filters, artifact.ByType(artifact.Checksum))
  		}
  		if put.Signature {
  			filters = append(filters, artifact.ByType(artifact.Signature))
  		}
  		// We support two different modes
  		//	- "archive": Upload all artifacts
  		//	- "binary": Upload only the raw binaries
  		switch v := strings.ToLower(put.Mode); v {
  		case ModeArchive:
  			filters = append(filters,
  				artifact.ByType(artifact.UploadableArchive),
  				artifact.ByType(artifact.LinuxPackage),
  			)
  		case ModeBinary:
  			filters = append(filters, artifact.ByType(artifact.UploadableBinary))
  		default:
  			err := fmt.Errorf("%s: mode \"%s\" not supported", kind, v)
  			log.WithFields(log.Fields{
  				kind:   put.Name,
  				"mode": v,
  			}).Error(err.Error())
  			return err
  		}
  		if err := uploadWithFilter(ctx, &put, artifact.Or(filters...), kind, check); err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // Upload does the actual uploading work