Chrome, pdf display, Duplicate headers received from the server

后端 未结 7 986
抹茶落季
抹茶落季 2020-12-14 14:29

I have a section on a website where I display a pdf inside a light box. The recent chrome upgrade has broken this displaying:

Error 349 (net::ERR_RESP

7条回答
  •  孤街浪徒
    2020-12-14 14:52

    I used @roryok's comment, wrapping the filename in quotes:

    Response.AddHeader("content-disposition", "attachment; filename=\"" + FileName + "\"")
    

    @a coder's answer of using single quotes did not work as expected in IE. The file downloaded with the single quotes still in the name.

提交回复
热议问题