talkgraphics
08-18-2010, 03:24 PM
Hi,
We have upgraded our forum to 4.0.6 today, and flash attachments are no longer showing inline in forum posts. In version 3.x we achieved this (and we know of the security implications btw) by 'hacking' the attachment.php file, and simply including SWF in the array of attachment types that get shown inline, as shown below.
Does anybody know how to achieve this in version 4.x?
Thanks,
Dan
if (in_array($extension, array('jpg', 'jpe', 'jpeg', 'gif', 'png', 'swf')))
{
header("Content-disposition: inline; $filename");
header('Content-transfer-encoding: binary');
}
else
{
// force files to be downloaded because of a possible XSS issue in IE
header("Content-disposition: attachment; $filename");
}
--------------- Added 1282206260 at 1282206260 ---------------
You'll have to excuse me, I'm having a bad day - in fact the exact same piece of code exists in VB4, and editing it the same way produces the same effect. Thanks.
We have upgraded our forum to 4.0.6 today, and flash attachments are no longer showing inline in forum posts. In version 3.x we achieved this (and we know of the security implications btw) by 'hacking' the attachment.php file, and simply including SWF in the array of attachment types that get shown inline, as shown below.
Does anybody know how to achieve this in version 4.x?
Thanks,
Dan
if (in_array($extension, array('jpg', 'jpe', 'jpeg', 'gif', 'png', 'swf')))
{
header("Content-disposition: inline; $filename");
header('Content-transfer-encoding: binary');
}
else
{
// force files to be downloaded because of a possible XSS issue in IE
header("Content-disposition: attachment; $filename");
}
--------------- Added 1282206260 at 1282206260 ---------------
You'll have to excuse me, I'm having a bad day - in fact the exact same piece of code exists in VB4, and editing it the same way produces the same effect. Thanks.