The background returns the file stream, and the front end downloads into a pdf file, which is downloaded successfully, but the display is blank and there are no files, please give me some advice?

1, the backend returns the file stream

clipboard.png
2pdf

clipboard.png


3.

clipboard.png

Apr.20,2021

I don't know if the landlord's problem has been solved. Let's answer it first. Maybe someone will need it later. Today, I also encountered the same problem when doing the same function. The downloaded pdf file has been blank all the time. Later, after consulting a lot of materials, I found that it is necessary to set up responseType: arraybuffer before downloading the content. For example, whether
axios.get ( url , {
responseType: arraybuffer
}). Then ()


responseType is set correctly, binary files are generally set to blob.


if the backend is a byte stream
frontend setting: response-type=blob, can normally receive


Mobile does not support this kind of download


@ melancholy Little Adong Hello, have you solved this problem? I have the same problem as you


how was the problem solved finally

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-1b39ef0-2b537.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-1b39ef0-2b537.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?