Js received that the data returned by the background is the garbled image of base64.

use ajax to send a request to the background. The base64 image is returned in the background, but the console prints out a pile of garbled codes. How to parse it? you want to put the returned base64 in the src of img directly

.

clipboard.png
ajax:

clipboard.png
how should this be parsed when the front end receives this

Mar.01,2021

according to the content of the log, the binary stream returned by the background should be a binary stream, and the full-scene random characters + JFIF tag should be able to determine that it is a binary stream of a JPEG file, not base64. So it should be OK to put the code displayed by the binary stream into the callback:

  

I have encountered the same problem as you. I have been reporting mistakes according to the above steps, and I don't know where I wrote wrong. That kind of garbled code is binary code. How can the front end be converted into base64

?
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b39a78-2c192.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b39a78-2c192.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?