Can you have the client make concurrent periodic get requests that return 
the current status?

Alternatively websockets (https://github.com/gorilla/websocket) may work 
depending on your deployment needs (Google App Engine doesn’t support them 
yet and old web browsers don’t support them).

Matt

On Friday, January 5, 2018 at 2:51:09 PM UTC-6, Jason Lee wrote:
>
> I've set up a GoLang post request handler that uploads a file to Google 
> Cloud Storage.
>
> Now I'd like to figure out how I can send the upload progress info back to 
> the client before the whole thing finishes.
>
> Through lots of searching, I've created a custom PassThru struct that 
> prints the progress in console. But I can't figure out how to send the 
> progress updates periodically back to the client.
>
> When I do fmt.Fprint(w, string), it waits for the whole thing to finish 
> and the client receives all of the written data at once.
>
> Can anyone please provide some help?
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to