Eysa
V2EX  ›  问与答

如何使 iis 能在浏览器里敲个 url 后下载 exe 文件呢。?

  •  
  •   Eysa · Feb 21, 2012 · 6264 views
    This topic created in 5375 days ago, the information mentioned may be changed or developed.
    4 replies  •  1970-01-01 08:00:00 +08:00
    ayanamist
    ayanamist
    Feb 21, 2012
    1
    给exe文件指定一个MIME
    Eysa
    Eysa
    OP
    Feb 21, 2012
    2
    @ayanamist
    貌似这样并不能再浏览器敲个url弹个下载框吧?
    Platinum
    Platinum
    Feb 21, 2012
    3
    Content-type: application/octet-stream
    bitsmix
    bitsmix
    Feb 21, 2012
    4
    'Content-Disposition':'attachment; filename=[your file name]'

    http response head 里面加上上面这个。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4735 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 02:12 · PVG 10:12 · LAX 18:12 · JFK 21:12
    ♥ Do have faith in what you're doing.