Jump to content

Recommended Posts

Posted

How does one enable executables to be uploaded to the File field? Just adding the file extension to the accepted extensions does not seem to work.

screenshot attached (ignore the label 'video')

chrome_axXHeb3gyA.png

Posted

"exe" is among the file extensions that is blocked in WireUpload.php

/**
 * Disallowed extensions for uploaded filenames
 * 
 * @var array
 * 
 */
protected $badExtensions = array('php', 'php3', 'phtml', 'exe', 'cfm', 'shtml', 'asp', 'pl', 'cgi', 'sh');

But it turns out you can override this by setting your own custom array of blocked extensions in your /site/config.php

// Remove "exe" from array of file extensions blocked by WireUpload
$config->uploadBadExtensions = array('php', 'php3', 'phtml', 'cfm', 'shtml', 'asp', 'pl', 'cgi', 'sh');

Of course exe is probably blocked by default for a reason so you would want to do your own research about possible risks involved in allowing such files on your server.

  • Like 3

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...