func FromReader(reader io.Reader, length int64) (string, error) {
	tmp, err := ioutil.TempFile("", "")
	if err != nil {
		return "", err
	}

	pr := progressReader(reader, length)
	if _, err := io.Copy(tmp, pr); err != nil {
		return "", err
	}

	tmp.Close()
	if r, ok := reader.(io.ReadCloser); ok {
		r.Close()
	}
	return tmp.Name(), nil
}
// FromReader downloads file from reader and return path to downloaded file.
FromReader downloads file from reader and return path to downloaded file.
// FromReader downloads file from reader and return path to downloaded file .
func FromReader(reader io.Reader, length int64) (string, error) {
	tmp, err := ioutil.TempFile("", "")
	if err != nil {
		return "", err
	}
	pr := progressReader(reader, length)
	if _, err := io.Copy(tmp, pr); err != nil {
		return "", err
	}
	tmp.Close()
	if r, ok := reader.(io.ReadCloser); ok {
		r.Close()
	}
	return tmp.Name(), nil
}
func FromReader ( reader io . Reader , length int64 ) ( string , error ) { tmp , err := ioutil . TempFile ( " " , " " ) if err != nil { return " " , err } pr := progressReader ( reader , length ) if _ , err := io . Copy ( tmp , pr ) ; err != nil { return " " , err } tmp . Close ( ) if r , ok := reader . ( io . ReadCloser ) ; ok { r . Close ( ) } return tmp . Name ( ) , nil }
FromReader downloads file from reader and return path to downloaded file.
FromReader downloads file from reader and return path to downloaded file .