Little fix for localhost testing

Added a condition to fix the animation problem when upload failed < 1s