upload media in media tab and update media using ajax