removed json encoding of BGupload, fixed regex for dataurl-Image