Safari Ajax Upload hanging fix

Several times I realized that in Safari the file upload via Ajax does not finish, especially when using Drupal forms. It is probably a Safari bug, but it is not really an alternative to wait for the fix, because the first time I saw this behaviour was with the release of Safari 5. After a short google session I found this article which is inspired by Basecamp, as the author states. I used this method to put together a tiny Drupal 7 module, which stops the annoying infinite loading. You can download it here.