code: func (b *Btelegram) handleUploadFile(msg *config.Message, chatid int64) string {
  	var c tgbotapi.Chattable
  	for _, f := range msg.Extra["file"] {
  		fi := f.(config.FileInfo)
  		file := tgbotapi.FileBytes{
  			Name:  fi.Name,
  			Bytes: *fi.Data,
  		}
  		re := regexp.MustCompile(".(jpg|png)$")
  		if re.MatchString(fi.Name) {
  			c = tgbotapi.NewPhotoUpload(chatid, file)
  		} else {
  			c = tgbotapi.NewDocumentUpload(chatid, file)
  		}
  		_, err := b.c.Send(c)
  		if err != nil {
  			b.Log.Errorf("file upload failed: %#v", err)
  		}
  		if fi.Comment != "" {
  			if _, err := b.sendMessage(chatid, msg.Username, fi.Comment); err != nil {
  				b.Log.Errorf("posting file comment %s failed: %s", fi.Comment, err)
  			}
  		}
  	}
  	return ""
  }
docs: // handleUploadFile handles native upload of files