fixed rcloud issue #623: made the upload_asset function local,removed  IIFE