When our front-end friends are coding, they will always encounter a problem: uploading files. Once the file is successfully uploaded, the backend will generously give us a download address. How to achieve online preview or direct download?
fliencn 是后端给的地址
这种是另外起一个标签页预览
$('.showFilecn a').attr('href', 'https://view.officeapps.live.com/op/view.aspx?src=' + fliencn).attr('target', '_blank');
这种直接下载了
$('.showFilecn a').attr('href',fliencn)