2014-02-14 38 views

回答

2

是的,你可以指定文件名,就像你會爲content-disposition: attachment,即這樣做:

Content-disposition: inline; filename="foo.bar" 

看到這個職位有關這個頭的一些有用的信息:How to encode the filename parameter of Content-Disposition header in HTTP?

+1

這不似乎在將其設置爲'inline;'通過POST加載文件後,這是我的Content-disposition標頭:Content-disposition:inline; filename =「foo.bar」'頁面的標題仍然設置爲'localhost:3000/blah/blah/blah'如果我嘗試保存文件,文件名被設置,但我希望設置標籤的標題。 –

+2

啊,這是不可能的。文件在瀏覽器中沒有標題。 – ThiefMaster

+0

這就是我的想法。謝謝! –