Jquery File download ($.fileDownload)

后端 未结 5 901
清酒与你
清酒与你 2021-02-06 04:52

I am using jquery file download ..

the code is as follows :

 function downloadFile(){
var downloadOptions = {
preparingMessageHtml: \"We are preparing y         


        
5条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-06 05:44

    On sucess;

    response.setHeader("Set-Cookie", "fileDownload=true; path=/");
    response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
    

    On error

    response.setHeader("Set-Cookie", "fileDownload=false; path=/");
    response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
    

    Use "Cache-Control" only if will exists anothers requests.

提交回复
热议问题