I am building a blob storage system and i picked Go as the programming language. I create a stream to do a multipart file upload from client to the blob server.
The stre
We can convert the stream into string and create it again as many times we need. e.g.
readerStream := your stream from source
buf := new(bytes.Buffer)
buf.ReadFrom(readerStream)
rawBody := buf.String()
newReader1 := strings.NewReader(rawBody)
newReader2 := strings.NewReader(rawBody)
But it will be great if it can be avoided.
I am not sure it is the best approach. But it worked for me.