DEV Community

qianduan
qianduan

Posted on

several ways to implement download a file use js

  1. send a post request and response a download stream
  2. query a request to get a url. Then window.open to open the file url.The url request response a download file header like disposition:download

Top comments (1)

Collapse
 
prime_1 profile image
Roshan Sharma

Nice, Clear examples for handling downloads in JS.