Fixed 'onprogress' event handling for file upload.

Before this change uploadProgress event didn't fire in Chrome and Firefox.