Merge pull request #593 from skpcharles/master

added validation for invalid file in media API
added validation for admin portal APIs