adapted media upload to gbili