Powershell to add SWF mime type

To avoid getting download prompt while opening an SWF file, you can add SWF MIME type to your web application. This will make sure that your SWF file opens in the browser, even if Browser file handling for the web applicaiton is set to "Strict".

$app = Get-SPWebApplication http://<yourWebApp>

$app.AllowedInlineDownloadedMimeTypes.Add("application/x-shockwave-flash")

$app.Update()

You can change the 2 line of the script to use it for other file/MIME types.

To learn more about browser file handling, please visit this page.

No comments:

Post a Comment