Properly handle failed uploads: display message, reset upload status
(cherry picked from commit ce7ccc1)