我正在创建一个base 64字符串,该字符串中也有“+”号。我本来打算通过Ajax将其发送到数据库,但是Ajax删除了“+”号,并将其替换为了空白——这是怎么回事?我怎样才能解决这个问题?
How are you sending it to your server ?
You must urlEncode what's in the url, or use JSON.stringify for an object you send as json.
This means you must decode it on the server side but most server technologies handle this for you.
This is because you are not url encoding the base64 before sending it.
Run your base64 through javascript's escape()
function before sending it.