Why can't files be downloaded by post without form forms?

  1. use the form form method= "POST" to download the file
  2. using a post request submitted by a non-form form to download a file that cannot be parsed is a pile of garbled
  3. is there a solution?
Mar.16,2021

answer for yourself after such a long time. The problem with
is that the result of the fetch request cannot be downloaded, while the form form submission can be downloaded automatically. What we need to solve here is fetch how to download automatically.

there is an object called , while the fetch request is Response object We usually use res.json () , which returns a Promise object parsed into JSON format. Here we need a Blob object, which can be obtained using the res.blob () method.

use URL's createObjectURL and revokeObjectURL to create Blob objects and allow the platform to garbage collect at the right time, respectively. The specific code is as follows:

  https://github.com/johnculvin.

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