Home > Net > Currently doing a web system, you need to add additional download function, how to implement this fe
Currently doing a web system, you need to add additional download function, how to implement this fe
Time:10-07
In using asp.net MVC to do a web system, you need to add additional download function, all attachments in a folder, folder will contain the files and subfolders, as to which file contains no analysis in advance, may not updated regularly, what better way to implement this function?
CodePudding user response:
The need to download the file away web directory, make a special place to store, Database to build a table, save resource name - & gt; File name or path name mapping (such as a count=25, file/data/download/6512 bd43d9caa6e02c990b0a82652dca), When people visit xxx.com/down/25, set the mime type to application/octet stream, read the file and push the binary stream in the past,
CodePudding user response:
Direct data inventory URL, the page can & lt; A href="https://bbs.csdn.net/topics/file path" & gt; Download & lt;/a>