sinatra server side file upload with progress bar ?

I’m obviously implying that the server side progress would involve a constant ajax polling action to see the progress, but the server would need to tell me what the progress is