How can attachments of H5 interface type be previewed

now the interface has returned to me an interface that directly downloads pdf files, not server source files. How can I preview
interface types as follows

http://60.10.25.240/api/common/UEditorDownload?suburl=ueditor/upload/file/20180802/1533197094431007371.pdf

Apr.05,2021

if you are asking why, you can look at this question. https://codeshelper.com/q/10.

and if you ask how to do it, just use pdf.js . The principle is to retrieve and parse the data through fetch , convert the text to text, and use blob to generate the picture
https://jsfiddle.net/63180768.

.

this type of download file interface is in the form of stream file stream returned directly to the browser. When the browser receives a resource in the form of stream, it will only download it and cannot be previewed.

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