only upload media if there is one

fixes #176