zzh941210

在配置文件(系统配置文件【例:system.properties】)中分别配置一下参数。

 

# pdfダウンロード時のコンテンツタイプ
content_type_pdf=application/pdf; charset=Shift_JIS
content_type_dlpdf=Application/Octet-Stream; charset=Shift_JIS
content_disposition_attachment=attachment  /*代表弹保存窗口

# csvダウンロード時のコンテンツタイプ
content_type_csv=application/csv; charset=Shift_JIS
content_disposition_inline=inline    /*代表由浏览器自动打开

 

 

----------------------------------

传统解决方案
后台设置response的类型,示例如下:

response.addHeader("Content-Disposition","attachment;filename="文件名称.txt");

分类:

技术点:

相关文章:

  • 2021-11-30
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2022-01-24
  • 2021-12-31
  • 2022-12-23
猜你喜欢
  • 2021-07-28
  • 2022-12-23
  • 2022-03-11
  • 2022-03-01
  • 2021-12-25
  • 2022-12-23
  • 2022-02-07
相关资源
相似解决方案