PDF Icon in SharePoint 2010

Peace be upon you,

Here is a clean way for adding the PDF icon to be recognized by SharePoint document library and also by search results:

http://stefvanhooijdonk.com/2010/08/27/pdf-icon-in-sharepoint/

The post is also having links to information about how to index the contents of a PDF file with SharePoint search.

Also, you can understand from here how SharePoint is handling the file icons in general:

http://msdn.microsoft.com/en-us/library/ms463701.aspx

In case you wanted to get Icon URL for a file, here is comparison between SPUtility.MapToIcon and SPFile.IconUrl:

http://www.bwaretech.com/en/Community/Team_Blog/EntryId/12/SPUtility-MapToIcon-vs-SPFile-IconUrl.aspx

SharePoint Web Application Browser File Handling

Peace be upon you,

We faced a problem lately in playing swf files under SharePoint 2010 and I thought of sharing its resolution with you.

In Web Application General Settings,  There is a setting called Browser File Handling and by default it is set to strict. This causes additional HTTP headers to be injected which forces the browser to download the file instead of opening it.

Here is a screen shot by fiddler showing the added header which makes the swf file downloaded instead of being player:

By setting this option to permissive the response header added above is removed and the flash player is now played and not downloaded, here is a screen shot:

I think this is an important information as same thing will happen with other file extensions.