Eysa
V2EX  ›  问与答

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

  •  
  •   Eysa · Feb 21, 2012 · 6260 views
    This topic created in 5373 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   ·   1935 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 08:11 · PVG 16:11 · LAX 00:11 · JFK 03:11
    ♥ Do have faith in what you're doing.