code: func (gw *Gateway) handleFilesUpload(fi *config.FileInfo) error {
  	client := &http.Client{
  		Timeout: time.Second * 5,
  	}
  	// Use MediaServerUpload. Upload using a PUT HTTP request and basicauth.
  	sha1sum := fmt.Sprintf("%x", sha1.Sum(*fi.Data))[:8] //nolint:gosec
  	url := gw.BridgeValues().General.MediaServerUpload + "/" + sha1sum + "/" + fi.Name
  
  	req, err := http.NewRequest("PUT", url, bytes.NewReader(*fi.Data))
  	if err != nil {
  		return fmt.Errorf("mediaserver upload failed, could not create request: %#v", err)
  	}
  
  	gw.logger.Debugf("mediaserver upload url: %s", url)
  
  	req.Header.Set("Content-Type", "binary/octet-stream")
  	_, err = client.Do(req)
  	if err != nil {
  		return fmt.Errorf("mediaserver upload failed, could not Do request: %#v", err)
  	}
  	return nil
  }
docs: // handleFilesUpload uses MediaServerUpload configuration to upload the file.
  // Returns error on failure.