views/upload: Fixed UnboundedLocalError