I haven't tried this, so it's more of speculation than an answer.
There is a streaming API in commons. If you were reading the stream, you could track how much is uploaded. You wouldn't be able to give the user a nice message as you'd have to just stop uploading at that point. But you could counter that with AJAX to state the server gave up.