move uploadComplet's call to success and handle error when you try to upload un supported format