更新时间:2022-05-10 08:15:19
将Content-Disposition的附件"部分更改为内联".
Change the "attachment" part of the Content-Disposition to "inline".
浏览器对Content-Disposition的支持不稳定.
Browser support for Content-Disposition is flaky.
在被支持之前,您曾经能够通过在URL末尾放置多余的键/值来使浏览器执行正确的操作.喜欢:
Before it was supported, you used to be able to get the browser to do the right thing by putting a superfluous key/value at the end of the URL. Like:
http://example.com/getPDF?id=123213&filename=mydoc.pdf
某些浏览器选择URL的最后一位作为文件名.不知道这是否仍然有效.
Some browsers picked up the last bit of the URL as the filename. Not sure if that still works.