I'm confused, download link is dynamic, not an absolute path, prompt box office agreed to download how do you write the code to achieve the file download?
CodePudding user response:
Links to write anything, is the main operating when click agree to request API returned directly to download resources, configuration of the response parameters (download) is a browser directly,CodePudding user response:
https://www.jb51.net/article/34951.htmCodePudding user response:
Browsers can't open the file if the file is then he will automatically download, which is as long as your server does not recognize this file format and resolution to the browser so he would have to download,,,
CodePudding user response:
1. The simple methodAt the time of download button click to js processing, and then use the location redirected, the disadvantage is that the user can bypass the tip to the url if you know the file,
High-end point method
2.Download, using the method of dynamic returned documents like CSDN download, users know the address is useless, because it is a dynamic verification returns,
Resources to pay the landlord if do download station recommended by the second approach,