ClassicPress PetitionsClassicPress Petitions
This is a read-only archive. Post or comment on the live version of this page on our forums.

The ability to upload swf file

April 16, 2019 · 21:34 · JerryNidzo
Description

Wordpress does not allow upload of swf file.
Why ClassicPress would not allow such a thing
we do not have to look for a third party for that.

someone wants to set banner etc.
Let's say I have a flash game site

Voters
Discussion
Code Potent

I'm not sure what the security implications are, but Flash usage is down to <5% of sites. Flash is more of an edge-case use, these days. Anyway, you don't need an outside plugin to enable swf uploads...just add the following to a utility plugin.

// Enable swf upload.
function codepotent_enable_swf_upload($mimes) {
$mimes['swf'] = 'application/x-shockwave-flash';
return $mimes;
}
add_filter('upload_mimes', 'codepotent_enable_swf_upload');

zigpress

AFAIK most browsers will no longer play SWF files anyway. Flash is dead, and I don't think you'll have much success persuading a living, breathing CMS to bring it back to life.

JerryNidzo

But there are so many site with flash games

Code potent
Where to paste this code

James Nylen

Flash is dead, and good riddance. Also, it has been a rat's nest of security, usability, and performance issues over the years.

You are welcome to try to make it work on your site though. You can put the above code snippet in your theme's functions.php file or a small custom plugin.

See also: https://codepotent.com/create-a-custom-utility-plugin-for-your-classicpress-site/