Added error exception for ivalid media upload