Hi All,
I am facing a strange problem with 'content-disposition' header. In my application i will publish some PDF documents which will be available for the end users for viewing/downloading purpose. Our aim is that when a user clicks on the link we open the document in the right pane of the browser window and also provide a proper filename in the 'save as' dialog box if user does a right click and selects 'save target as' option from the menu.
We could achieve this by using the 'content-disposition' header. We used the header as follows:
"Content-Disposition: inline; filename=test_file.pdf;".
But now we are facing a strange issue. The filename we populate above is generated dynamically and if this name contains the word "attachment" IE instead of opening the document inline pops up the "File Download" dialog box.
In this situation the header looks as shown below:
"Content-Disposition: inline; filename=test_attachment.pdf;".
If i remove this word "attachment" from the 'filename' part of the header above things work as expected.
As per my understanding the "File Download" dialog box should have been poped out if and only if i had specified the disposition method as 'attachment' .i.e. if i had used the content-disposition header as follows:
"Content-Disposition: attachment; filename=test_file.pdf;".
I am using IE6.0 with SP2. The above behavior can be seen with both Acrobat Reader 6.0 and 7.0 plugins for IE.
Any suggestions?
Thanks,
Avadhut.