code: func (gw *Gateway) handleFilesLocal(fi *config.FileInfo) error {
  	sha1sum := fmt.Sprintf("%x", sha1.Sum(*fi.Data))[:8] //nolint:gosec
  	dir := gw.BridgeValues().General.MediaDownloadPath + "/" + sha1sum
  	err := os.Mkdir(dir, os.ModePerm)
  	if err != nil && !os.IsExist(err) {
  		return fmt.Errorf("mediaserver path failed, could not mkdir: %s %#v", err, err)
  	}
  
  	path := dir + "/" + fi.Name
  	gw.logger.Debugf("mediaserver path placing file: %s", path)
  
  	err = ioutil.WriteFile(path, *fi.Data, os.ModePerm)
  	if err != nil {
  		return fmt.Errorf("mediaserver path failed, could not writefile: %s %#v", err, err)
  	}
  	return nil
  }
docs: // handleFilesLocal use MediaServerPath configuration, places the file on the current filesystem.
  // Returns error on failure.