code: def deploy_media():
      
      if not env.MEDIA_URL or not env.MEDIA_ROOT or 'http://' in env.MEDIA_URL: return
      local_dir = env.MEDIA_ROOT
      
      remote_dir = '/'.join([deployment_root(),'public']) 
      media_url = env.MEDIA_URL[1:]
      if media_url:
          remote_dir = '/'.join([remote_dir,media_url])
      if env.verbosity:
          print env.host,"DEPLOYING media",remote_dir    
      deployed = deploy_files(local_dir,remote_dir)
      
      #make writable for www-data for file uploads
      sudo("chown -R www-data:sudo %s" % remote_dir)
      sudo("chmod -R ug+w %s"% remote_dir)
      return deployed
docs: Deploy MEDIA_ROOT unversioned on host